Nic 0 Posted May 3, 2002 Ok, basically there are two guys in a jeep, driver and gunner, they goto the position of game logic set about in the town,if the gunner (tw7) stays alive then it should keep looping, if he dies it should go on to the next part of script... Sometimes it works perfectly.......but most times it doesnt and they go to one of the points and just sit there. #next jeep2 commandmove [(getpos p2 select 0),(getpos p2 select 1)] @unitready jeep2 jeep2 commandmove [(getpos p8 select 0),(getpos p8 select 1)] @unitready jeep2 jeep2 commandmove [(getpos p4 select 0),(getpos p4 select 1)] @unitready jeep2 jeep2 commandmove [(getpos p5 select 0),(getpos p5 select 1)] @unitready jeep2 jeep2 commandmove [(getpos p3 select 0),(getpos p3 select 1)] @unitready jeep2 ?(alive tw7):goto "next" Is there something wrong with this script, or is this just a problem that occurs? One time I put titletext in there to see test if it was looping and it always just stops at a random point... Any ideas guys? Share this post Link to post Share on other sites
Bart.Jan 0 Posted May 3, 2002 The script is fine. I think problem is with @unitready jeep2. Script is waiting until jeep is in exact location as px. Try : @(jeep2 distance px)<15 Share this post Link to post Share on other sites
Dawdler 0 Posted May 3, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Bart.Jan @ May 03 2002,08:25)</td></tr><tr><td id="QUOTE">The script is fine. I think problem is with @unitready jeep2. Script is waiting until jeep is in exact location as px. Try : @(jeep2 distance px)<15<span id='postcolor'> @unitready reacts to when the unit is READY, not when it has moved to exact location (OFP movement isnt that exact). If it has moved there, it is of course ready. The unit can move to the pos? It should work then. A better way would be to simply make waypoints and then stop the jeep if the gunner dies... Share this post Link to post Share on other sites
Rob 1 Posted May 3, 2002 the script is perfectly done.... you should use this if tw2 dies ?(tw7 <0):goto "whatever" but isn't this what wp are for? Share this post Link to post Share on other sites
Bart.Jan 0 Posted May 3, 2002 4--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Dawdler @ May 03 2002,094)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Bart.Jan @ May 03 2002,08:25)</td></tr><tr><td id="QUOTE">The script is fine. I think problem is with @unitready jeep2. Script is waiting until jeep is in exact location as px. Try : @(jeep2 distance px)<15<span id='postcolor'> @unitready reacts to when the unit is READY, not when it has moved to exact location (OFP movement isnt that exact). If it has moved there, it is of course ready. The unit can move to the pos? It should work then. A better way would be to simply make waypoints and then stop the jeep if the gunner dies...<span id='postcolor'> You are right. @unitready is better and should work. If you want to create dinamicaly changing route for unit you must to use commandmove instead of waypoints. Share this post Link to post Share on other sites
Bart.Jan 0 Posted May 3, 2002 I found way with triggers. It can be done with setwppos command. Share this post Link to post Share on other sites
Nic 0 Posted May 3, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Rob @ May 03 2002,10:59)</td></tr><tr><td id="QUOTE">the script is perfectly done.... you should use this if tw2 dies ?(tw7 <0):goto "whatever" but isn't this what wp are for?<span id='postcolor'> Is there something wrong with using  ?(alive tw7):goto "next" But ive never been a big fan of using waypoints for anything, i usually try to avoid them, they kinda limit what you can do and if you want complicated things to happen you have to use scripts.. I'm really not sure what to do here though. The problem still occurs and I have no idea why, Ive done similar things in other levels and not had any problem. If you call on a lot of scripts at the same time is it possible that it could be too much for the game to handle at once and they may not work correctly? Cause in the level im making there is a lot of things happening. Otherwise... Share this post Link to post Share on other sites