SWEFIDDE 0 Posted June 11, 2007 Hej I have made i misson like omoha beach and i wonder, if i can make a trigger so all AI players eject when they hit the beach. Now i have a lots of waypoints,"get out" every players just geting killed when the boat slows down so they can get out. But if i have a eject trigger and i move waypoint every one jumps out quicker then i get out waypoint! i have tested to put this in a trigger "_x action[ ""eject"",vehicle _x ]" foreach thislist ... and when i click ok in the trigger its just came up this!!! "foreach: type string, expected code" i dont now how to make it work! mabe you can send me the misson files? to my e.mail cs_zle3er@hotmail.com Thanks! Â Â Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted June 11, 2007 You came very close <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x action[ "eject",vehicle _x ]} foreach thislist Remember, code in { }, string in " " or "" "" or ' ' (unless it's a code string ) Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 11, 2007 You might want to use a delay too unless you want all the units ejecting at exactly the same time and piling up on the same spot: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_X action ["EJECT",vehicle _X]; sleep 1} forEach thislist Share this post Link to post Share on other sites
Rexxenexx 0 Posted June 12, 2007 Hi guys, I have a similar question. I'm trying to get troops in PBX's to jump out of a boat into the water. I have a Move waypoint with this exec "ejectAll.sqs" ejectAll.sqs= <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_this action ["EJECT",vehicle _this]} forEach units _this Only one guy ejects and the rest head for shore. How can I force them all to jump out at the same time? EDIT: Whooops! N/M :P Brain fart! I got it...It should be: ejectAll.sqs= <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x action ["EJECT",vehicle _x]} forEach units _this EDIT2: OK heres the best version I got so far: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _troops = units _this {unassignVehicle _x;_x action ["EJECT",vehicle _x]} forEach _troops _troops allowGetIn false They jump out and stay out. Share this post Link to post Share on other sites