Jump to content
Sign in to follow this  
Albert Schweitzer

proceed to next waypoint after switchmove

Recommended Posts

I created a soldier and named him "max". I gave him a first waypoint to sit on a bench. That works perfectly with

Quote[/b] ]dostop this; this switchmove "MH6_Cargo03";  this setpos (bench modelToWorld [0.2,-.1,1.3]);  this dowatch (this modelToWorld [0,100,3]);

Obviously once he sits down he doesnt care about his next waypoint anymore. So I thought I add a trigger that tells him stop being so lazy after 10 seconds and to get up from his bench. I thought after this he would be able to walk again.

Trigger

Quote[/b] ]max switchmove "AcrgPknlMstpSnonWnonDnon_AmovPercMstpSrasWrflDnon_getOutLow";

He does the animation to get up from his bench but doesnt proceed to the next waypoint! He just stands still and basically tries to imply "screw you Albert, I wont move if you are too dump to script me properly"!

What do I have to add to show this stupid soldier who is the owner of the game and who is the slave of my commands?

Share this post


Link to post
Share on other sites

Not sure for ArmA but should be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">max switchmove ""

or

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">max switchmove "null"

after a small pause to make sure the stand from sitting anim has finished.

Share this post


Link to post
Share on other sites

The problem is you've told the unit to doStop. A unit will not follow his leader, or if he is leader he will not follow his waypoints until he is ready (check using unitReady command).

To return an stopped unit to ready status, I use the following :

unit doMove getPos unit

as soon as he arrives at his own location (pretty quick smile_o.gif ), he returns to his ready status.

Share this post


Link to post
Share on other sites

Jep, works perfectly. I somehow knew this dostop would be the problem. Now he finishes his animation and then runs to the car! Perfecto

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  

×