Jump to content
Sign in to follow this  
GothicOne

How would i cancel waypoints

Recommended Posts

How would I cancel waypoints when a trigger condition is met and send unit to the last or another waypoint. Basically ignoring unload waypoints for a vehicle.

Scenario: Two sets of soldiers showing up in UAZ's at separate times. If first set is killed before second set arrives then second set see's the dead first set and cancels unload turns around and high tails it outa there to either coordinates or another waypoint.

I tried !alive and domove, didn't work.

Thank God for forums. Many thanks.

Share this post


Link to post
Share on other sites

Okay, I'm not completely sure about this one but:

create a trigger, inside the condition Field put:</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(alive soldier1) && !(alive soldier2) && .....<span id='postcolor'>

... means repeat for more soldiers

in the onActivation field put </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [group UAZ2, 2] setWPPos getMarkerPos "runaway"; UAZ2 setSpeedMode "FULL"; group UAZ2 setCombatMode "RED"; group UAZ2 setBehaviour "COMBAT"; group UAZ2 lockWP true;

<span id='postcolor'>

the 2 in [group UAZ2, 2] specifies the waypoint number for the transport unload waypoint. (just count)

runaway should be an empty marker that you call runaway

somewhere where you want the UAZ2 to run to.

SO, this assumes you call the uazs UAZ1 and UAZ2, and soldiers in UAZ1; soldier1 soldier2 .....

Well there might be some details u may have to resolve but this is one way of doing it

EDIT: instead of doing setWPPos you could probably do </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">UAZ2 move getPos runaway;

<span id='postcolor'>

Share this post


Link to post
Share on other sites

LOL !!! Whats all that mess bn880 ?

All you have to do is switch the waypoint. Here's how-

Make your trigger (of type "switch") with condition-

not (alive soldier1) and not (alive soldier2)

sync the trigger with your unload waypoint. If the soldiers are killed, it will switch the waypoint from the unload to the next move waypoint...thats it !

Share this post


Link to post
Share on other sites

I'll try both. Actually I think bn880's would be a better solution for this situation since there are two waypoints a get out and a move after the unload and before the "runaway" waypoint. I believe the switch type would cancel the unload but the driver would get out and continue to the other waypoints unwanted waypoints. The switch type would be perfect if there was only one waypoint after the unload.

Cheers

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  

×