Jump to content
Sign in to follow this  
Szadowsz

help with Waypoint script

Recommended Posts

I need help writing a waypoint script for a chopper in chernarus

i need to send it away from the current area(towards the main city or main airfield) and then get it to delete itself and its crew

any help/advice would be appreciated

Share this post


Link to post
Share on other sites

Set the final MOVE waypoint well out of the Area of Operations then in that waypoint's On Act field put the following:

{deleteVehicle _x} forEach crew h1; deleteVehicle h1;

h1 = name of the helo.

Share this post


Link to post
Share on other sites

@Szadowsz:

And that has to be done with scripted waypoints? Or any method would suffice?

I mean it`s actually pretty easy to do it.

If you delete it anyway mid-air, it doesn`t matter where you do it, only important thing is that it`s far enough from the player.

So try.

_x=getpos player select 0;

_y=getpos player select 1;

_chopper domove [_x+3000,_y+3000];

waituntil {unitready _chopper};

{deletevehicle _x} foreach crew _chopper;

deletevehicle _chopper;

EDIT: kylania had the solution while i was typing hehe

Share this post


Link to post
Share on other sites
Set the final MOVE waypoint well out of the Area of Operations then in that waypoint's On Act field put the following:

{deleteVehicle _x} forEach crew h1; deleteVehicle h1;

h1 = name of the helo.

i can't actually creat a waypoint using the editor as i am usin a fastrope addon (norrins i think) that gets messed up if you add in waypoints afterwards.

i was just wondering how to write a script that would do basically that

Share this post


Link to post
Share on other sites
i can't actually creat a waypoint using the editor as i am usin a fastrope addon (norrins i think) that gets messed up if you add in waypoints afterwards.

i was just wondering how to write a script that would do basically that

Just override it brutely then!

for [{_i=0}, {_i<count waypoints GROUPNAME_OF_YOUR_CHOPPER}, {_i=_i+1}] do

{

deleteWaypoint [GROUPNAME_OF_YOUR_CHOPPER, _i]

};

and then either domove the thing or add a scripted waypoint with addwaypoint

Share this post


Link to post
Share on other sites
i can't actually creat a waypoint using the editor as i am usin a fastrope addon (norrins i think) that gets messed up if you add in waypoints afterwards.

i was just wondering how to write a script that would do basically that

Put a marker where you want it to delete and use doMove to make it go there. Once it's close maybe have a trigger to delete it or just let the script do that.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×