OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: NoMaD on 29 Apr 2004, 07:51:34

Title: Waypoint Selection.
Post by: NoMaD 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.
Title: Re:Waypoint Selection.
Post by: WizzyWig 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
Title: Re:Waypoint Selection.
Post by: Raptorsaurus 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.