grimmmammoth 0 Posted July 15, 2007 Ok I have a Rhib come pick us up after a mission. I know how to have it wait until we all get in using  "in boat' in the condition and it works if all of us get in but if one or more die then it doesn't work because i it set to have all of us get in. So how can i set it so say the current team leader gets in and then it goes to the next way point. Or how do you set it so that if the remaining squad (no matter how many get killed)all get in it activate the next waypoint? Share this post Link to post Share on other sites
fasad 1 Posted July 15, 2007 Try using count to check that the number of the group's units that are in the boat equals the number of units in the group. Share this post Link to post Share on other sites
grimmmammoth 0 Posted July 15, 2007 could you show me a specific script for this as an example please ? Share this post Link to post Share on other sites
Schwab 0 Posted July 15, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> { waituntil{_x in boat}; }foreach units(group(yourteamleader)); Then you set a variable to true and put that in the Wp condition. Share this post Link to post Share on other sites
grimmmammoth 0 Posted July 15, 2007 I tried the code but it didnt work is the boat name simple "boat" or does it matter? And soes it need to be three lines or can it be one long line? Im new at this can you tell Share this post Link to post Share on other sites
fasad 1 Posted July 15, 2007 The syntax of Schwab's code's is not correct, it should be {command} forEach array. In ArmA SQF syntax, a semi-colon (;) can be used to seperate statements. eg : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">myUnit = player; myUnit setDir 2; myUnit setDamage 0.1; is the same as : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">myUnit = player; myUnit setDir 2; myUnit setDamage 0.1; Share this post Link to post Share on other sites
Schwab 0 Posted July 15, 2007 ups...sry fasad is of course right -.- too early in the morning boat should be the vehicle, whatever name u gave it. yourteamleader is the name of the leader you spoke of, if its always you, you can use player instead. i edited the foreach above btw ^^ Share this post Link to post Share on other sites
grimmmammoth 0 Posted July 15, 2007 so for this example the code would look like ? Share this post Link to post Share on other sites
fasad 1 Posted July 15, 2007 try this : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({_x in myVehicle} count units myGroup) == count units myGroup returns true when all members of myGroup are in myVehicle. Share this post Link to post Share on other sites
grimmmammoth 0 Posted July 15, 2007 Ok I tried that and it said ==: Type array excpected number ,string,object,group ..... Also do i need to name the group "myGroup" and does the boat have to be named "myvehicle' Thanks for the help I appreciate it. Share this post Link to post Share on other sites
Taurus 20 Posted July 15, 2007 Also do i need to name the group "myGroup" Yes In the initfield of any of the group members, makes most sense if its in the leaders initfield put myGroup = group this; does the boat have to be named "myvehicle' Yepp, without the quotation marks of course Either in the name-field of the unit put myvehicle Or in the init myvehicle = this; Share this post Link to post Share on other sites
grimmmammoth 0 Posted July 15, 2007 ok where do i go to edit the init. im only saving this so far in user missions. Share this post Link to post Share on other sites
grimmmammoth 0 Posted July 15, 2007 srry reading it agian you told me how to do it thanks. I will try that. will it get rid of the error message from fasad's script? Thanks again guys This is my second day at this and I'm learning alot Share this post Link to post Share on other sites
grimmmammoth 0 Posted July 15, 2007 Thanks guys it worked great!!! Share this post Link to post Share on other sites