Forum Jump :

Author Message


Posts: 16
Rank:


Level: Member

Country: ar
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2010-03-28 06:21        
     
Hallo community!
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!
Look:

6 setradiomsg " "
clear=false
ready=false

player sidechat "Big bird, big bird, we need immediate air support! over."
~2
heli sidechat "Copy, sir, we're on our way! out."

#loop
_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", " "]

@ clear=true

deletewaypoint _wp1

_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]", " "]

@ ready=true

goto "loop"


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!


Author Message

Dead3yez  

I am evil


Posts: 3113
Rank:


Level: Member

Country: en
Location: North Yorkshire
Occupation: dead3yez
Age: 29
In-game name: dead3yez

 
#2 Posted at 2010-03-28 12:40        
     
Perhaps move or doMove might work better than a waypoint.

http://community.bistudio.com/wiki/doMove
http://community.bistudio.com/wiki/move


Advertisement


Author Message


Posts: 16
Rank:


Level: Member

Country: ar
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2010-03-28 19:02        
     
Oh!
I'd totally forgotten about that! :P

Thanks a lot Dead3yez!