• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows [SOLVED] event_type in asynchronous System Event only returns 7


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");
Last edited: