SD_BOB 10 Posted December 16, 2011 Hi guys, i'm currently using the following as a condition for a vehicle to move. ({_x in vehicle} count units mygroup == {alive _x} count units mygroup); I've run into a bit of a problem with capacity of the vehicle. So my question is... Is it possible to create a condition such as above, but checking two vehicles rather than just the one? I would like to be able to meet the condition if all of my group are in either of the two vehicles... Thankyou in advance for any help. Share this post Link to post Share on other sites
demonized 20 Posted December 16, 2011 (edited) ({[b]_x [url="http://community.bistudio.com/wiki/in"]in[/url] vehiclename1 [url="http://community.bistudio.com/wiki/or"]OR[/url] _x in vehiclename2[/b]} count units mygroup == {alive _x} count units mygroup); edit: and for more vehicles instead of long condition line you can use array of vehicles: ({[url="http://community.bistudio.com/wiki/vehicle"]vehicle[/url] _x [url="http://community.bistudio.com/wiki/in"]in[/url] [b][vehiclename1,vehiclename2,vehiclename3][/b]} count units mygroup == {alive _x} count units mygroup) Edited December 16, 2011 by Demonized Share this post Link to post Share on other sites
igneous01 19 Posted December 16, 2011 (edited) try this instead: {waitUntil {vehicle _x != _x && alive _x}} foreach units mygroup that will check if a unit is any vehicle, if you want to refine it to only two specific vehicles, test those conditions with vehicle _x == veh1 || vehicle _x == veh2 Edited December 16, 2011 by Igneous01 replaced and with or Share this post Link to post Share on other sites
demonized 20 Posted December 16, 2011 try this instead: {waitUntil {vehicle _x != _x && alive _x}} foreach units mygroup that will check if a unit is any vehicle this will cause a delay until AI team leader or yourself notices that unit is dead if so. better use OR !alive _x instead of && alive _x in above condition. , if you want to refine it to only two specific vehicles, test those conditions with vehicle _x == veh1 && vehicle _x == veh2 above condition will fail every time since && means and, wich is translated to: vehicle unit is veh1 and vehicle unit is veh2, wich never happens ofc, only one vehicle at a time, unless you are a wizard ofc ;) it should be OR or the sqs equivalent || && wiki Share this post Link to post Share on other sites
igneous01 19 Posted December 16, 2011 this will cause a delay until AI team leader or yourself notices that unit is dead if so. better use OR !alive _x instead of && alive _x in above condition.above condition will fail every time since && means and, wich is translated to: vehicle unit is veh1 and vehicle unit is veh2, wich never happens ofc, only one vehicle at a time, unless you are a wizard ofc ;) it should be OR or the sqs equivalent || && wiki my mistake, meant || ;) as from my experience, alive fires off the moment the ai unit dies, it has never delayed for me. However, depending on the realism of the situation, you would usually wait until all members are in vehicle, since you dont know who is down, once someone is confirmed to be down, then the leader should order to take off. Share this post Link to post Share on other sites
SD_BOB 10 Posted December 16, 2011 Cheers guys, testing this now. Share this post Link to post Share on other sites