buggs 0 Posted January 31, 2003 Can anybody help with the following problem? Scenario: west plane ( p1) is shot down over enemy territory. East tank (bmp1) locates wreckage (by using a tracking script) and stands guard. Problem: the west plane can crash anywhere on the map (totally random) and the bmp will find this using the tracking script, the problem is when the bmp finds the plane it wont stop at or near the plane, it drives up to the plane & continues to push up against this. What I would like it to do is to stop about 30ft away and stand guard. Bare in mind that as far as I know you wont be able to use waypoints  because of the random location. Any idea’s. Here’s the tracking script I have been using:its by BullMarket007. _grp1 = _this select 0 _grp2 = _this select 1 #Here _grp2 commandmove getpos _grp1 ~20 ?(alive _grp1):goto "Here" exit. Share this post Link to post Share on other sites
Ćlçi®-Å�yon 0 Posted January 31, 2003 My way would be: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _grp1 = _this select 0 _grp2 = _this select 1 #Here _grp2 commandmove getpos _grp1 ~20 ?((_grp1 distance _grp2) >= 30) and (alive _grp1): goto "Here" exit <span id='postcolor'> So, i hope that' s right. Greets Åyon Share this post Link to post Share on other sites
buggs 0 Posted January 31, 2003 Thanks for the quick responce Ćlçi®-Åyon. ill check it out. Cheers Buggs. Share this post Link to post Share on other sites
InqWiper 0 Posted January 31, 2003 Hmm... I dunno what script you are using but... Cant you just make a trigger? Condition: not(alive Plane) On Activation: BMP1 domove [getpos Plane select 0,(getpos Plane select 1)+30] or something like that... Share this post Link to post Share on other sites
buggs 0 Posted January 31, 2003 could'nt get the script to work, but i tried the trigger and that works fine. Thanks to the both of you for your help. cheers Buggs Share this post Link to post Share on other sites
Spitfire 0 Posted February 1, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Ćlçi®-Åyon @ Jan. 31 2003,19:51)</td></tr><tr><td id="QUOTE">My way would be: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _grp1 = _this select 0 _grp2 = _this select 1 #Here _grp2 commandmove getpos _grp1 ~20 ?((_grp1 distance _grp2) >= 30) and (alive _grp1): goto "Here" exit <span id='postcolor'><span id='postcolor'> Åyon's code should work if you replace and with && Share this post Link to post Share on other sites
InqWiper 0 Posted February 1, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Åyon's code should work if you replace and with &&<span id='postcolor'> Whats the difference between "and" and "&&" ? Also between "!" and "not" and I think there is also "or" and "||" or something like that. Share this post Link to post Share on other sites
Spitfire 0 Posted February 1, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Feb. 01 2003,14:26)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Åyon's code should work if you replace and with &&<span id='postcolor'> Whats the difference between "and" and "&&" ? Also between "!" and "not" and I think there is also "or" and "||" or something like that.<span id='postcolor'> Hmm.. I've always assumed that you have to use && and || in scripts instead of AND and OR... Also, I thought that AND and OR work only in .sqf -functions and .cpp files. Share this post Link to post Share on other sites
InqWiper 0 Posted February 1, 2003 I use "and" in my scripts and I´ve never had any problems, I never use "&&" or "||". Share this post Link to post Share on other sites
Ottie 0 Posted February 2, 2003 You can move waypoints with setWpPos see command reference Share this post Link to post Share on other sites
buggs 0 Posted February 2, 2003 Cheers Ottie, i'll check that out. Â Share this post Link to post Share on other sites