Search the Community
Showing results for tags 'handledamage'.
Found 6 results
-
Friends, I come to you again, great sages of Arma 3 codes to perhaps solve my current problem... This problem is as follows, I want a static object in my scenario to be destroyed if it takes any instance of damage. The object in question is "Land_PortableServer_01_olive_F". In the init field I tried to put a code that works perfectly on the units: this addEventHandler ["HandleDamage",{ _this spawn { if (_this select 2 > 0) then { _this select 0 setDamage 1; }; }}]; As I said, in units this code works. If I shoot the unit in the foot that has this code in its init, it will be immediate death. But as in the current case the code is in a static object, it doesn't work. I've already tried shooting all the bullets from my gun on this portable server, hand grenades, RPG, tank artillery... nothing happens xD I did a test to see if it is possible for this object to be destroyed by activating a trigger with the code: hard setDamage 1; Oh, the name of the object is "hard" by the way, because of hardware. And another trigger with the condition: !alive hard; Upon activation: hint "It worked"; And it worked... my test. But I wanted this object to be destroyed if it was hit by something, like the code there that works with the units as I explained. If that were possible, I could create a bad ending for the sci-fi mission I'm creating. Thank you in advance for your time!
-
i need some help whit this i want to (if player get Damage and that Damage are enough to kill player then spawn fnc_tazed )
-
EH handleDamage - must run everywhere, but...
pierremgi posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I'm still looking for the best way to manage some revive heal in SP and MP session. SP works fine but I can't find a reliable solution for MP, with the EH handleDamage. Restarting from the basement, I'd like to share this test I can't explain the result: I placed 2 playable groups in editor. and 1 trigger (true) to run this code: {_x addEventHandler ["handleDamage", { params ["_unit","","_dam"]; hint str (getAllHitPointsDamage _unit); _dam min 0.86 }]; } forEach allunits; This code is running on each hosted/clients. The EH is supposed to limit all the hits at 0.86 max. This way the unit is wounded but never die (OK in SP or units on hosted server). PS: I know, I can write the hint inside of a loop rather than inside of the EH, but that doesn't change anything for the following issue: If I JIP on the 2nd group leader, so the group will be remote to the client's PC. The group owner changes. Normal. Then if I continue to fire against these remote units, the EH still fires (I can see the new value for getAllHitPointsDamage), so the hint is "ok" then the EH code runs but the remote units die! - I can shoot the units of my group: they never die, - all remote units are dying... Everything goes as the EH fires locally (normal: E.L.) but this localization is not updated to the new localization of the unit! This EH is hard to manage, even for so small behavior as modifying a value for hit damage. I miss something, probably. Any help appreciated. Thanks.- 6 replies
-
- 2
-
- eventhandler
- localization
-
(and 2 more)
Tagged with:
-
handleDamage - STOP VEHICLE DAMAGE ON PLAYERS
AngryHerring posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm looking for an Anti "VDM", to 'disable' damage when vehicle collides with AI or players. Many Thanks! I've tried the following; but with no luck. My file name is fn_handleDamage.sqf. I am hosting this on a private server via the Eden editor (I am only making this for small fun missions for me and my friends). With the script, no error shows up, and the damage is still there Any help please?- 1 reply
-
- handledamage
- vehicle damage
-
(and 2 more)
Tagged with:
-
HandleDamage Script Seems To Heal Player Occasionally
RootinTootinShootin posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi everyone! I know ARMA 3 wasn't built for it at all but I've been trying to make a couple "action movie" style Scenarios, using the following commonly suggested script to reduce player damage: this setVariable ["selections", []]; this setVariable ["gethit", []]; this addEventHandler [ "HandleDamage", { _unit = _this select 0; _selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; _selection = _this select 1; if !(_selection in _selections) then { _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection; _olddamage = _gethit select _i; _damage = _olddamage + ((_this select 2) - _olddamage) * 0.25; _gethit set [_i, _damage]; _damage; } ]; Now, I found this actually does its job most of the time (in vanilla at least), allowing the player to soak up a fair few shots before dying, but in certain situations it seemed like the enemies were taking longer than they should have to kill me - they'd unload what seemed like a couple clips into me, then I'd die kind of abruptly, making it seem almost random if the bullet dealt me damage or not. I installed a Status Bar mod which gave my health as a percentage, and it seemed as though certain shots, especially when I was under fire from multiple enemies, seemed to be healing me. There's every chance that the status bar mod was giving me an incorrect readout but what it was showing seemed to explain some previous issues I've had with this script - e.g. suddenly appearing to take no damage at all on one playthrough when I'd previously been able to tank around 10 or so shots from regular enemies before being killed. Perhaps I was taking so much damage that the formula was trying to multiply a negative number, resulting in me being healed? Thank you so much for taking a look at this post, any input is appreciated - I understand that ARMA wasn't built for things like this but with a Mission Editor THIS good it's always nice to have the option if you ask me!- 5 replies
-
- handledamage
- increase health
-
(and 1 more)
Tagged with:
-
eventHandler hit or handleDamage issue
killshot posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everybody! I have an object - a wall with steel door - which I want to be only affectable by two kinds of explosive devices and not by any other possible influences. If it gets hit by DemoCharge ("DemoCharge_Remote_Mag"/"DemoCharge_Remote_Ammo") I want only the door to be breached. wall setDamage 0.7 or wall setHit ["hit1",1] If it gets hit by SatchelCharge ("SatchelCharge_Remote_Mag"/"SatchelCharge_Remote_Ammo") I want the wall to experience full damage. I've searched and tried for a couple hours now, but unforunately without success, so I hope one of you can reach a helping hand. Maybe it's important too to mention, that I am using ACE3? I noticed with this addEventHandler ["handleDamage", { hint parseText format ["Target: %1 <br/> Selection: %2 <br/> Damage: %3 <br/> Source: %4 <br/> Ammo: %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),(_this select 4)];}]; that there is no (_this select 4) "Ammo", when using the explosives. Is there any way to solve/workaround the problem? Kind regards.- 2 replies
-
- handleDamage
- hit
-
(and 1 more)
Tagged with: