Home   Help Search Login Register  

Author Topic: Waypoint Selection.  (Read 485 times)

0 Members and 1 Guest are viewing this topic.

NoMaD

  • Guest
Waypoint Selection.
« on: 29 Apr 2004, 07:51:34 »
Greets.
I want to be able to command an AI chopper pilot to take me to a choice of destinations, as in i may select... DZ2  or DZ3, DZ4 etc instead of to just a waypointed destination. How do i do it?.
NoMaD.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:Waypoint Selection.
« Reply #1 on: 29 Apr 2004, 10:14:45 »
ok do somthing like this make a script and in this script add
pu this in choppers init

[Choppername] exec "scriptname.sqs"


scriptname .sqs
Code: [Select]
_Chopper = _this select 0

WP1 = false
WP2 = false
WP3 = false
;This is to detect if WP1 = true and move to selcted WP1
#loop

?(WP1):_Chopper domove getMarkerPos "WP1";

?(WP2):_Chopper domove getMarkerPos "WP2";

?(WP3): _Chopper domove getMarkerPos "WP3";

;and so on

~0.001

goto "loop"

;end of script

now go to mission and set 3 markers called WP1,WP2,WP3 and place them at the point were you would like to go

now set triggers to alpha,brovo,charlie
and in each activation put WP1 = true and so on up to WP3 = true.

then if you wanna do landings and stuff you need to add landing stuff to the script there is lots out there but i hope this helps
« Last Edit: 29 Apr 2004, 10:17:03 by WizzyWig »

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Waypoint Selection.
« Reply #2 on: 29 Apr 2004, 22:36:29 »
You can also use onmapsingleclick in a script and the AI will take you to the place yuo click on the map.