1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

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

Discussion in 'GameMaker Studio 2 Community Tech Support' started by JulianS, Aug 6, 2019.

  1. JulianS

    JulianS Member

    Jul 17, 2019
    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: Aug 6, 2019

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice