Jump to content
Sign in to follow this  
CombatComm

vehicle player setVehicleArmor not working?

Recommended Posts

As above, or I just don't understand how this command works. I am trying to set the health of a weapons cache to a level so that ONLY a satchel charge or explosive can destroy it. However when I try setting this value to vehicle player setVehicleArmor 1 it dosent get any stronger. Bullets still destroy it. Can anyone please assist? Thank you.

Share this post


Link to post
Share on other sites

Try this

this addEventHandler ["HandleDamage", 
{
if ((_this select 4) == "DemoCharge_Remote_Ammo") then {1} else {0};
}];

Share this post


Link to post
Share on other sites

CLOSE! Bullets dont damage it but now niether does the charge lol. Could it have something to do with global vs local variables etc? I have the cache named in the editor. Thanks again

Share this post


Link to post
Share on other sites

There's two C4's right? Are you using the other one perhaps?

You can do this

this addEventHandler ["HandleDamage", 
{
copyToClipBoard str (_this select 4);
}];

To get the name of what damaged it. (Ctrl + V after you did the damage).

You can add several damages types like this:

this addEventHandler ["HandleDamage", 
{
if ((_this select 4) in ["DemoCharge_Remote_Ammo","DemoExample2","DemoExample3"]) then {1} else {0};
}];

Just change the examples to whatever class name you get from the copyToClipBoard.

It's not a problem with local or global variables. The box does not need to be named, you only need to put this code in the init field of the box.

Share this post


Link to post
Share on other sites

Should the clipboard come up on screen or do I have to find it in Arma directory. In any case, even with the clipboard script the cache simply is invisible. I assume the clipboard script event handler dosent care WHAT destroys the cache, it is just suppose to tell me what destroyed it, right?

EDIT---- Hey bud thanks so much for your help got it to work! Like you said just a case of mistaken classname. Satchelcharge ammo. Thanks again!

Edited by CombatComm

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×