I'm making an Air Support addon (actually it is a HowTo kinda thing... I'ma post how it's done ;)) but i'm having a bit of trouble with the waypoint!
6 setradiomsg " "
player sidechat "Big bird, big bird, we need immediate air support! over."
heli sidechat "Copy, sir, we're on our way! out."
_wp1 = heli addWaypoint [position player, 0]
_wp1 setwaypointtype "HOLD"
_wp1 setWaypointCombatMode "RED"
_wp1 setwaypointBehaviour "STEALTH"
_trg1 = createTrigger ["EmptyDetector", position Player]
_trg1 setTriggerArea [100, 100, 0, false]
_trg1 setTriggerActivation ["EAST", "NOT PRESENT", false]
_trg1 setTriggerStatements ["this", "clear=true", " "]
_trg2 = createTrigger ["EmptyDetector", position Player]
_trg2 setTriggerArea [0, 0, 0, false]
_trg2 setTriggerActivation ["NONE", "PRESENT", false]
_trg2 setTriggerStatements ["clear", "heli domove getpos H; heli flyinHeight 1; heli action ["engineoff",heli]", " "]
In mi mission i did this: i placed a trigger that gets activated with radio Foxtrot. When it's activated the script does. In the script i've created (or i'm trying to...) a waypoint over me, so the heli will come to my position and hold (like explined in script). At the same time, a trigger was created over me with 100/100 axis, it gets activated when there no more OpFor units within a 100mts from me. IF there're no more OpFor units within a 100mts from me, then _wp1
will get deleted and another trigger will be instantly created over me, saying that if clear=true then the heli will go back to the defined LZ: H.
I know the script has many errors 'cause i have to fix some things... My only question was why the addwaypoint didn't work out?!
Thanks to all!