Page MenuHomeFeedback Tracker

Event Handler handledamage hitSelection always returns "body"
Reviewed, NormalPublic

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Health System
Steps To Reproduce
  1. open editor
  2. place a player and ai
  3. put this code init of ai --- this addEventHandler ["handledamage", "hint _this select 1"]
  4. shoot ai in the legs,arms,head

Event Timeline

Wulf added a subscriber: Wulf.Mar 27 2018, 2:11 PM

Hello.

Thank you for the report. Although the steps that you have provided do not work. Specifically the code.

It is better to use

this addEventHandler ["HandleDamage", {_s = _this select 1; hint format ["The %1 has received %2 damage.", _s, _this select 2]; }];

We will have a look at the handler and see what can be done.

Wulf changed the task status from New to Reviewed.Mar 27 2018, 2:11 PM
armatech added a subscriber: armatech.EditedOct 22 2018, 1:03 PM

I found this also in MP when being shot in the legs would always return arms even when naked

[CIV2,""arms"",1.13333,EMT1,""B_9x21_Ball"",10,EMT1,""hitarms""]

player addEventHandler ["HandleDamage",
{
	_unit = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
	_selection = [_this, 1, "", [""]] call BIS_fnc_param;
	_hit = [_this, 2, 0, [0]] call BIS_fnc_param;
	_source = [_this, 3, objNull, [objNull]] call BIS_fnc_param;
	_typeOfProjectile = [_this, 4, "", [""]] call BIS_fnc_param;
	_hitIndex = [_this, 5, 0, [0]] call BIS_fnc_param;
	_instigator = [_this, 6, objNull, [objNull]] call BIS_fnc_param;
	_hitPoint = [_this, 7, "", [""]] call BIS_fnc_param;
	diag_log format["%1", _this]
}];