Before someone asks me to read docs, I did. This is definition of user events as per GMS:
User Defined Event
These are special events that are not triggered by GameMaker: Studio itself, but have to be implicitly called by you from a code box while the game is running. These events can contain code or actions and do the same things as any other event, making them very useful for creating your own events that happen when you decide and not GameMaker: Studio decides!
So, from what I understand, these events called by the running game can include blocks of code.
I created a user defined 0 event, in which I placed
code game_end();
Inside the object's step event I check for keyboard
up key and execute the event user defined 0, which
should end game right ?
// in step event
if keyboard_check_direct(vk_up)
{
event_perform(ev_user0,0);
}
Does not work, nothing happens.
I even tried commenting out the if, just for testing purposes and nothing happens.
Mind you this is just out of curiosity, as I would probably use control objects if need be. but I would like to know why this does not work.