ADuke 1 Posted July 18, 2010 Hi, I am making an HMMWV, whenever the vehicle takes damage, such as running into a tree or wall, the crew takes damage, how can I stop this from happening. I am guessing it is in the hit points section of my config under "passthrough". Am I correct in this assumption. Thanks, -AD Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 18, 2010 Hi,I am making an HMMWV, whenever the vehicle takes damage, such as running into a tree or wall, the crew takes damage, how can I stop this from happening. Well, you unless your HMMWV has some really thick padding all around the crew, it doesn't make any sense to not get injured when you crash into stuff. :confused: But, I'm not sure how to disable this at a config level. Script-wise you might be able to, but you'd have a difficult time distinguishing between damage caused by collisions and damage caused by enemy fire. Share this post Link to post Share on other sites
ADuke 1 Posted July 18, 2010 Well, you unless your HMMWV has some really thick padding all around the crew, it doesn't make any sense to not get injured when you crash into stuff. Seatbelts, ever backed your car into something? Did you have to go to the hospital? Bet you had to take your car to the mechanic though right? :) Guess I can't config it to differentiate between light impacts and impacts that would actually hurt the crew so oh well. Share this post Link to post Share on other sites
Q1184 0 Posted July 18, 2010 (edited) Back in ACE1 we had a fix for precisely these occasions. It was based on Hit event handler attached to the CAManBase class. The called function is as follows: _unit = _this select 0; _injurer = _this select 1; _dmg = _this select 2; // *** preventing reckless driving injuries if (_unit != vehicle _unit && alive (vehicle _unit)) then { if (typeName _injurer == "OBJECT") then { if (_injurer in (vehicle _unit)) then { if (_dmg < 0.25) then { _unit setdamage (damage _unit - _dmg); }; }; }; }; Edited July 18, 2010 by Q1184 Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 18, 2010 Seatbelts, ever backed your car into something? As far as I'm aware, seatbelts aren't used in military vehicles. I'd imagine they'd just get in the way. Share this post Link to post Share on other sites
ADuke 1 Posted July 18, 2010 As far as I'm aware, seatbelts aren't used in military vehicles. I'd imagine they'd just get in the way. Really? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 18, 2010 Still seems like one of those things that nobody's gonna use in combat... Share this post Link to post Share on other sites
norrin 9 Posted July 19, 2010 Hey mate. One way to do this, is when the units enter a vehicle eg. vehicle _unit != _unit; use this: _unit allowDamage false; This will stop the units travelling in the HMMWV from taking damage. This will work fine in single player - its a little more complicated in MP as you need to declare this code on "all machines to have a global affect". Hope everythings good in your neck of the woods. Best wishes, norrin Share this post Link to post Share on other sites
el76 0 Posted July 19, 2010 Hey mate.One way to do this, is when the units enter a vehicle eg. vehicle _unit != _unit; use this: _unit allowDamage false; This will stop the units travelling in the HMMWV from taking damage. This will work fine in single player - its a little more complicated in MP as you need to declare this code on "all machines to have a global affect". Hope everythings good in your neck of the woods. Best wishes, norrin This should solve your problem for MP, if you put this into the initline of the units who should be affected by this. this addEventHandler [GetIn", {player allowdammage false}]; this addEventHandler ["GetOut", {player allowdammage true}]; OK, forget about this. Mixed something up. Wrong forum... :D Share this post Link to post Share on other sites