logan83 11 Posted March 3, 2014 Hi to all! im working in a PMC mod, and i want add a "bulletproof" car... but i dont know how do this... i dont want a indetructible car... i ned a civ car with more strenght to simulate a bulletproof vehicle... any Idea? Share this post Link to post Share on other sites
fusion13 11 Posted March 3, 2014 Ypu could do something with the config. Like take some highpoint off Share this post Link to post Share on other sites
KC Grimes 79 Posted March 3, 2014 Here's an EH I use to damper damage. Do a search on getHit and you'll see where I got it from. I strongly suggest you do that to know what you're doing. vehiclename setVariable ["selections", []]; vehiclename setVariable ["gethit", []]; vehiclename addEventHandler [ "HandleDamage", { _unit = _this select 0; _selections = vehiclename getVariable ["selections", []]; _gethit = vehiclename getVariable ["gethit", []]; _selection = _this select 1; _projectile = _this select 4; if !(_selection in _selections) then { _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection; _olddmg = _gethit select _i; _curdmg = _this select 2; if (_projectile == "") then { _curdmg; } else { _newdmg = _olddmg + (_curdmg - _olddmg) / 6; _gethit set [_i, _newdmg]; _newdmg; }; } ]; Near the middle you see a / 6. This means the applied damage is being divided by 6. You can play with that, ie increasing it, to make a vehicle take less damage (rather, it takes the same amount of damage, but the damage itself is reduced) Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted March 3, 2014 If you got arma2 OA you could take a look at the config of the armored suv, felt really solid driving that thing. Share this post Link to post Share on other sites
Tankbuster 1733 Posted March 3, 2014 The OP is asking for a bulletproof car, not one that takes little damage. I think he wants protect the occupants of the car rather than stop the car taking damage. Share this post Link to post Share on other sites
KC Grimes 79 Posted March 3, 2014 The OP is asking for a bulletproof car, not one that takes little damage. I think he wants protect the occupants of the car rather than stop the car taking damage. Can just as easily add an EH to players so that if they are in the vehicle they take no damage, and go a mile further and make it so that they only start to take damage when the vehicle is at a certain damage point. Share this post Link to post Share on other sites
Tankbuster 1733 Posted March 3, 2014 Yes, this would be better, I think. Share this post Link to post Share on other sites
KC Grimes 79 Posted March 3, 2014 Yes, this would be better, I think. Functionally, I think so. Has the same noticeable effect as a mod would. However, would such EHs eventually cause some problems? For instance, a mission of 10 BLUFOR and 2 "armored" vehicles. Thats 1 EH per man and 1 per vehicle, so 12, all of which run per-damage, which is often multiple times per-projectile. Is this a resource hog at some point? Share this post Link to post Share on other sites
Tankbuster 1733 Posted March 3, 2014 On a single car, not really. On a 30 car convoy? perhaps. :) Share this post Link to post Share on other sites
jandrews 116 Posted March 3, 2014 (edited) this allowDamage false; should do the trick, not sure if you want more than that. reading the post, it appears you do. Edited March 3, 2014 by JAndrews1 Share this post Link to post Share on other sites
logan83 11 Posted March 3, 2014 Oks thanks foy answering to all... i try th Grimes [3rd ID] script... aplied in the vehicle config.cpp and works with the car... but if i shoot through the glass i kill the ocupants... fuck Share this post Link to post Share on other sites
KC Grimes 79 Posted March 3, 2014 Oks thanks foy answering to all... i try th Grimes [3rd ID] script... aplied in the vehicle config.cpp and works with the car... but if i shoot through the glass i kill the ocupants... fuck Interesting that you applied it in that way. But if it works, it works. Like I said in the following post in response to Tankbuster's reply, you'll then need another EH for each player that controls their damage, my suggestion being simply negating any damage to them if they are in the vehicle. You can check this by seeing if their name comes up in the vehicle's crew array. You'll use the same EH that you are for the vehicle, just a little modified. That should get you going. If you need help, just let me know. Share this post Link to post Share on other sites
fusion13 11 Posted March 4, 2014 Take the hitpoint from the glass should do the trick eh? Share this post Link to post Share on other sites