J
JulianS
Guest
I am trying to write a gamepad detection with an asynchronous system event in GMS2 but instead of "gamepad discovered" or "gamepad lost", I only get undefined when reading the variable event_type. Nonetheless the event is triggered when I connect or disconnect a controller. It's only event_type not telling me what kind of system event this is.
EDIT: I now found my mistake. The problem was that I tried to access the variable directly instead of looking for it in the ds map.
The right way to do it for me was:
var event_type = ds_map_find_value(async_load,"event_type");
EDIT: I now found my mistake. The problem was that I tried to access the variable directly instead of looking for it in the ds map.
The right way to do it for me was:
var event_type = ds_map_find_value(async_load,"event_type");
Last edited by a moderator: