TRexian 0 Posted November 8, 2010 I have a mission where there is a group of opfor in an open Ural truck. If I am lucky, I can kill at least some of them when they are in the truck. But then, if I want to pillage their equipment, I can't? Is there some way to get them out of the truck, or see what gear they have? TIA Share this post Link to post Share on other sites
SnR 1 Posted November 9, 2010 Have a look around the mission editing threads :) Share this post Link to post Share on other sites
TRexian 0 Posted November 9, 2010 I searched what I thought would make sense, but found nothing on-point. :) I'd like to not have to script something that would eject dead bodies, but probably can if that's the only option.... Share this post Link to post Share on other sites
SaOk 112 Posted November 9, 2010 You can delete the units in the car with: {deletevehicle _x;} foreach crew vehiclename - (units group player); or you can use [driver vehiclename, gunner vehiclename]. Edit: Btw This topic should be in the editing section. Share this post Link to post Share on other sites
ProfTournesol 956 Posted November 9, 2010 You can delete the units in the car with: {deletevehicle _x;} foreach crew vehiclename - (units group player); or you can use [driver vehiclename, gunner vehiclename]. You should have read the OP post, not only the topic title :) Share this post Link to post Share on other sites
wheres my rabbit ? 10 Posted November 9, 2010 the only way you get get them out without scripting anything is to tell your AI if you have any to get it in the vehicle. once they have filled all the empty slots they will start throwing the bodies out to take the spaces taken by the dead.. not very good as you need enough AI in your team to fill the vehicle. Share this post Link to post Share on other sites
SaOk 112 Posted November 9, 2010 Damn, sorry. I misread the whole post. Bear, out. Share this post Link to post Share on other sites
nettrucker 142 Posted November 9, 2010 Yeah do as wheres my rabbit said. In case you don't have Ai subordinates at disposal you gotta get inside the truck yourself and occupy the slot's so that the dead bodies will be ejected. Otherwise you need to write a short script. kind regards Share this post Link to post Share on other sites
TRexian 0 Posted November 9, 2010 Yikes. I may make a related suggestion in the (hopefully) appropriate place for BI to address it. I *like* the realism of having dead people in the vehicles, but at the same time, would really like to get at their equipment. Perhaps at this point, it should go in the editing, as it looks like I'll have to use an addaction for each vehicle that will check each vehicle position index for a live unit, and eject it if it is dead.... (I don't have any AI compatriots in this mission.) Share this post Link to post Share on other sites
shuko 59 Posted November 9, 2010 Add an action to vehicles which shows up if driver seat it empty/has dead guy and theres dead units in crew. Didn't test if the crew or some other command returns dead units and not just those alive. Share this post Link to post Share on other sites
ProfTournesol 956 Posted November 9, 2010 Perhaps at this point, it should go in the editing, as it looks like I'll have to use an addaction for each vehicle that will check each vehicle position index for a live unit, and eject it if it is dead.... (I don't have any AI compatriots in this mission.) Or retrieve dead units weapons / magazines through a little script and add them to the vehicle load through addweaponcargo and addmagazinecargo command. Share this post Link to post Share on other sites
TRexian 0 Posted November 9, 2010 (edited) I was thinking of just having a loop that ran through each index and checked if there was a unit there, and if it was alive or dead. I don't think I want it dependent on if the driver is alive or not, as sometimes I may want to sneak up on the truck from behind, so the driver might still be alive. :) Edit: Oooh - I like ProfTournesol's idea, too. Hmm.... Edit2: Mods - some direction, please? In retrospect, I probably should have made this an editing post. Since I anticipate posting the solution to my problem, I'd like to know whether this can be moved or if I should start a new thread? Thanks! :) Also, to all - found this command that appears rather recent: leaveVehicle. Maybe it is just new to me? Edited November 9, 2010 by TRexian Share this post Link to post Share on other sites
MulleDK19 21 Posted November 12, 2010 What about extracting the First Aid modules and take a look at how they handle the pulling out, of injured soldiers in vehicles, then make a custom module? Share this post Link to post Share on other sites
ProfTournesol 956 Posted November 12, 2010 Also, to all - found this command that appears rather recent: leaveVehicle. Maybe it is just new to me? Hehe, contrary to what the biki says, this command was existing since OFP. I used it to force crews to definitely cease using their vehicle, instead of always wanting to get back into it (unassignvehicle or ordergetin false wasn't effective enough for crew members). Share this post Link to post Share on other sites
TRexian 0 Posted November 15, 2010 Ok lads, here's what I have that seems to work as an init-line parameter for the vehicle, this is the script JTD_kickOut.sqf: // _kickAction = this addAction ["Bring out yer dead", "JTD_kickOut.sqf", [], 1, false, true, "", ""] private ["_kickAction", "_vehicle", "_dudes", "_newPos"]; _vehicle = _this select 0; _dudes = crew _vehicle; { if !(alive _x) then { UnAssignVehicle _x; _x action ["getOut", _vehicle]; _newPos = (getPos _vehicle) findEmptyPosition [(random 5), 10]; _x setPos _newPos; }; } forEach _dudes; It isn't really pretty, and I may end up using some sort of conditional - right now, attached to the vehicle, it is always an option, even if the vehicle is empty. And, I had to use the setPos, because dead guys don't 'eject' or 'leaveVehicle' (at least I couldn't get it to work). I think the unAssignVehicle and action commnads are probably unnecessary, but it works. :D Share this post Link to post Share on other sites