Page MenuHomeFeedback Tracker

[EventHandler] "HandleDamage" return value is not used in expected way when assigned to own player
Closed, ResolvedPublic

Description

(Tested singleplayer/editor only)
The current implementation of HandleDamages return value is only working with other units but the player itself like expected!

Details

Legacy ID
167161520
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. Add this script example from the wiki page to your player

_es = this addEventHandler ["HandleDamage", {hint "IMMA INVINCIBLED!"; 0}];

  1. place some enemy units around
  2. get them shooting you

expected: 4. player will stay alive

Additional Information

http://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage
quote:
"Return value of 0 will make the unit invulnerable if damage is not scripted in other ways (i.e using setDamage and/or setHit for additional damage handling). "

Event Timeline

X39 edited Steps To Reproduce. (Show Details)Nov 8 2013, 3:53 AM
X39 edited Additional Information. (Show Details)
X39 set Category to Scripting.
X39 set Reproducibility to Always.
X39 set Severity to None.
X39 set Resolution to Fixed.
X39 set Legacy ID to 167161520.May 7 2016, 5:22 PM
Bohemia added a subscriber: Dwarden.Nov 8 2013, 3:53 AM

Download Dev branch or add pause before adding EH on Main branch

0 = this spawn {sleep 0.2; _this addEventHandler ["HandleDamage", {0}]}

due to bug still present on main branch

Yep, already fixed in dev branch. It will come to the main branch with next patch.

X39 added a subscriber: X39.May 7 2016, 5:22 PM
X39 added a comment.Nov 19 2013, 1:22 AM

Tested it a few seconds ago
Its true
works like expected in dev version
it would be nice if i could get the knowledge about when the next update will arrive (because i need this function for my small mod im currently writing)