Page MenuHomeFeedback Tracker

EH "GetIn" & "GetOut" does not fire for the object "player"
Closed, ResolvedPublic


If you add an "GetIn" or "GetOut" eventHandler to the player, it will not fire if the player enters a vehicle.
It only fires if the EH has been added to the specific vehicle.


Legacy ID
No Bug
Steps To Reproduce
  1. Open Editor
  2. Place player and a empty vehicle
  3. Preview

4a. Enter following for the player into the Debug Console:
player addEventHandler ["GetIn", {titletext["it works","PLAIN"];}]; - this will not work
4b. Name your vehilce "TestVehicle" and enter the following into your Debug Console:
TestVehicle addEventHandler ["GetIn", {titletext["it works","PLAIN"];}]; - this will work

Additional Information

As described above, 4a will not work if the player enters the vehicle.
4b will work.

This is a problem if you want all players have the same EH if entering a vehicle which could have been created from one player (like he bought it in CTI or else) and you want to maybe make an overlay over the radar for deactivating it.

Because it won't synchronize with other players, only the player who created the vehicle has now the EH for the vehicle, but the other MP-players do not.

Event Timeline

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

How is this a bug? You cannot enter inside yourself or exit from inside yourself.

As descriped in the Biki:
GetIn: "Triggers when a unit enters a vehicle. [...] This EH is neither triggered upon a change of positions within the same vehicle nor by the moveInXXXX commands. However it is triggered by a "GetInXXXX" action."

GetOut: "Triggers when a unit gets out from a vehicle. [...] This EH is triggered by both the moveOut command and by "GetOut" action."

So the EH will fire if a unit enters a vehicle. So you can add the EH to a specific vehicle and if the player enters this it should do something OR you add the EH to the player, so it fires EVERYTIME the player enters a vehicle.

Uh, this isn't a bug.

You attach the event handler to the vehicles, not the units.
The player is not a vehicle, so it makes no sense to get a callback when someone enters the player.

Sure it is a bug, if the description in the wiki is correct:

Passed array: [vehicle, position, unit]

    vehicle: Object - Vehicle the event handler is assigned to
    position: String - Can be either "driver", "gunner", "commander" or "cargo"
    unit: Object - Unit that entered the vehicle

vehicle: Object - subclasses
A vehicle is an Object such as a Tank, car, Helicopter.

A Person is a soldier, man, leader, player, woman.

A Unit is either a Person, or, Vehicle

It clearly states:
vehicle: Object - Vehicle the event handler is assigned to
and not
vehicle: Vehicle - Vehicle the event handler is assigned to

Okay, I can't make another reply to this without using the words "stupid", "retard" or "simpleton".

What the hell?
I ask for help and find a bug and get bad feedback or worse, insults from you?
I present facts and you just say "No it is not like that".
Thanks a lot

Xeno added a subscriber: Xeno.May 7 2016, 5:29 PM
Xeno added a comment.Nov 22 2013, 5:54 PM

You have to add the eventhandlers to vehicles not units. A vehicle is also an object.

What you are looking for is getInMan and getOutMan. Both eventhandler strings are in the A3 exe (since the Alpha was released) but were never implemented (they are available in VBS 2 for a long time).


Thanks for the update.
Even if the EH is for vehicles only, it does not say in the BIKI - that's my whole point. Of course a vehicle is a object, but so is the player.

Still would be nice if this would work

Xeno added a comment.Nov 23 2013, 10:44 AM

The BIKI is not always correct. Don't forget that it is not maintained by BI staff but mostly by normal users.

Anyway, this is only possible with the mentioned getInMan and getOutMan eventhandlers. But like so many things, we probably won't see them in the Arma series.

It's pretty clear from the Wiki description that it needs to be attached to a vehicle.

And if the description wasn't clear enough it couldn't be more clear from the parameters passed to the handler.

VEHICLE: Object - Vehicle the event handler is assigned to
position: String - Can be either "driver", "gunner", "commander" or "cargo"
UNIT: Object - Unit that entered the vehicle