matjoa 0 Posted April 25, 2003 If I'm right, the setWPPos is used to construct a Waypoint dinamically, isn't it? I wrote that script activated by a trigger: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> patrol1 = group unit1 [unit2] join patrol1 [patrol1,0] setWPPos getpos gl1 [patrol1,1] setWPPos getpos gl2 <span id='postcolor'> Where gl1 and gl2 are two GameLogic. Well they join a group correctly but don't move to the first WP. They are there stopped and waiting I don't know what. What is wrong in my script? or maybe I'm missing anything? TIA JF. Share this post Link to post Share on other sites
RED 0 Posted April 25, 2003 You can't creat waypoints with setWPPos, you can only move them. Why not use the domove command? RED Share this post Link to post Share on other sites
matjoa 0 Posted April 25, 2003 Thank you, I didn't know that. So I have to use domove comand but I've found two doubts: 1. I need move a whole group, and this command is only for units. Do I need to use dofollow or foreach commands ? 2. Why the group setspeedmode "LIMITED" doesn't work when I use domove? On the other hand, It works using waypoints. TIA. JF. Share this post Link to post Share on other sites
RED 0 Posted April 25, 2003 1. The domove command is for 1 unit. The move command is for a group. 2. Group setspeedmode "LIMITED" should work with the move command. RED Share this post Link to post Share on other sites
matjoa 0 Posted April 25, 2003 Thank you. I've tried with the move command and it works. JF. Share this post Link to post Share on other sites
iNeo 0 Posted April 26, 2003 Use this instead of your original script: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">patrol1 = group unit1 [unit2] join patrol1 [patrol1,0] setWPPos getpos gl1<span id='postcolor'> Place one WP close to gl1, make it one of the type 'HOLD'. In it's init.-field, put: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[patrol1,0] setWPPos getpos gl2<span id='postcolor'> You move around the same WP, which will never be finished because it's of the type 'HOLD' which never finishes. I think this should work, haven't tested it. Share this post Link to post Share on other sites
matjoa 0 Posted April 27, 2003 Thank you, but I think that the command move works and it is enough for my mission. Only a question. If I put three move commands all in a row in a script: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> patrol1 move getpos gl1 patrol1 move getpos gl2 patrol1 move getpos gl3 <span id='postcolor'> Where will "patrol1" go? are they going to pass one by one or just will they move to the last point? In the command ref., for the move it says: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Description: Creates waypoint move on given position (format Position) and makes it actual group waypoint. <span id='postcolor'> JF. Share this post Link to post Share on other sites
RED 0 Posted April 27, 2003 I am almost 100% sure that they will just go to gl3, to make sure they only go to the next waypoint you can use the unitready command. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> patrol1 move getpos gl1 @unitready (leader patrol1) patrol1 move getpos gl2 @unitready (leader patrol1) patrol1 move getpos gl3 <span id='postcolor'> RED Share this post Link to post Share on other sites
matjoa 0 Posted April 27, 2003 Thank you. You are right. They went to the last point. With the @unitready command they go point by point like an editor WayPoint. Share this post Link to post Share on other sites