Page MenuHomeFeedback Tracker

HandleDamage is now completely broken
Closed, ResolvedPublic

Description

Using this command...
this addEventHandler ["HandleDamage",{if (_this select 1=="") then {damage (_this select 0)+((_this select 2)/1000)}}]

...On Infantry:
This command should increase soldier's vitality 1000x. But still the soldier gets killed on few hits if fired repeatedly into one body part.

...On Vehicle:
"/" Doesn't work on vehicles.
"*" Causes any vehicle to be destroyed on few hits

Details

Legacy ID
3329339725
Severity
None
Resolution
No Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. Create unit and into it's init field type: this addEventHandler ["HandleDamage",{if (_this select 1=="") then {damage (_this select 0)+((_this select 2)$#)}}]

where instead of "$" type "/" or "*" and instead of "#" type any number.

  1. Run mission and shoot the unit with Handledamage command on and see that the damage system is wrong and that it doesn't care about Handledamage command.

Event Timeline

Snipedhunter edited Additional Information. (Show Details)
Snipedhunter set Category to Scripting.
Snipedhunter set Reproducibility to Always.
Snipedhunter set Severity to None.
Snipedhunter set Resolution to No Bug.
Snipedhunter set Legacy ID to 3329339725.May 7 2016, 5:24 PM

player setHit ["head", 1];

will kill the player. When you filter (_this select 1 == "") you allow hits to individual parts like "head" come through unchanged. This is not a bug.

Can you please write me that script? I really don't know this scripting language.

There is no bug here. Please use the forums for scripting discussion.