lucilk 10 Posted August 27, 2009 (edited) how can i remove all units form a vehicle trough a script command, not just a specific units, i want at the begining of a script the first thing to to is to eject any units inside a vehicle (players and AI) Edited August 27, 2009 by lucilk eject not delete Share this post Link to post Share on other sites
ProfTournesol 956 Posted August 27, 2009 (1) why when empty vehicles are available ? (2) Anyway, type this in the init line of the vehicle : {deletevehicle _x} foreach crew this Share this post Link to post Share on other sites
lucilk 10 Posted August 27, 2009 :D no... you see its a vehicle that has an action, ok and i want the units inside the vehicle to be ejected when they activate that action beacuse there will bea a base deployed and there are some objects attachet to the vehicle so if he deploys those buildings he can run away with the vehicle and buildings and all. so i just tought maibe i could do something to eject everybody from the vehicle when that action is activated. Share this post Link to post Share on other sites
Bon 12 Posted August 28, 2009 hi lucilk, in case u still need help with it, did you try {_x leaveVehicle <vehicle>} foreach crew <vehicle>; yet? Share this post Link to post Share on other sites
manzilla 1 Posted August 28, 2009 I've been wondering this as well. I've run into times when this would come in handy while making missions. Share this post Link to post Share on other sites
lucilk 10 Posted August 28, 2009 player action ["eject",pbhmv]; {_x action ["eject",pbhmv]} forEach units pbhmv; this was the answer, i found out my self, thx anyway , hope it works well Share this post Link to post Share on other sites
Bon 12 Posted August 28, 2009 Then it should be {_x action ["eject",pbhmv]; unassignVehicle _x;} forEach units pbhmv; to remove the units from the internal vehicle list. Otherwise the units will try to reenter the vehicle after they eject. Share this post Link to post Share on other sites
lucilk 10 Posted August 28, 2009 yes you are right but... the vehicle pbhmv is not assigned to anyone that is a spawned empty, so he will eject anyone, player or AI. so yes both examples are good, depends... situation you know... thx man. Share this post Link to post Share on other sites