Jump to content
Sign in to follow this  
facoptere

"GetIn" vehicle EventHandler bug

Recommended Posts

Version 1.62.101144

According to h t t p : / / community.bistudio.com/wiki/ArmA:_Event_Handlers#GetIn,

"GetIn" EH should have the vehicle object as first element of _this, but in fact the player object is present.

There is no such bug in "GetOut" EH.

PoC:

if _x is a vehicle, if you add these 2 EH:

_x addEventHandler ["GetIn", { diag_log(format["GetIn debug: %1",_this]); }];

_x addEventHandler ["GetIn", compile ("diag_log(format[""GetIn workaround: real veh is "+str(_x)+" but GetIn gives %1"",_this]);" )];

In RPT you will see:

2013/01/24, 17:05:18 "GetIn debug: [b 1-1-C:1 (Vador76) REMOTE,"driver",B 1-1-C:1 (Vador76) REMOTE]"

2013/01/24, 17:05:18 "GetIn workaround: real veh is 17f390c0# 1055355: hilux1_civil_3_open.p3d but GetIn gives [b 1-1-C:1 (Vador76) REMOTE,"driver",B 1-1-C:1 (Vador76) REMOTE]"

As you can see, the player is twice in _this, and there is no reference of the vehicle.

On the second addEventHandler, the handler is compiled at runtime and so vehicle can be hardcoded. It's ok for logging, but you can't code anything smarter since you don't have vehicle object handle.

Share this post


Link to post
Share on other sites

repro mission + CIT bug report ticket ? :)

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  

×