Change Event on Object

MissingNo.

Member
Is there a way to change an object event with code? Like for example change the
end step to the begin step event?

I want to be able to play code in different events. I couldn't find anything like what I'm describing.
 

YoSniper

Member
What I would recommend is to write the code to be executed in either event in a script.

Then set a variable in the Create Event that you can toggle with a debug key.

Below is an example:

Create Event
Code:
run_in_begin = true;
Begin Step Event
Code:
if run_in_begin {
    scr_obj_step();
}
End Step Event
Code:
if not run_in_begin {
    scr_obj_step();
}
Key Press <Debug Key>
Code:
run_in_begin = not run_in_begin;
 

MissingNo.

Member
What I would recommend is to write the code to be executed in either event in a script.
Thought about doing it this way but I was hoping there was a more direct command to achieve this, but I assume there is not?

If not I will just have to live with the workaround.
 

YoSniper

Member
Thought about doing it this way but I was hoping there was a more direct command to achieve this, but I assume there is not?

If not I will just have to live with the workaround.
Maybe a more experienced user will disagree, but I'm pretty sure that the Create, Begin Step, End Step, etc. events for each object are more or less hard coded into the Game Maker engine.
 
Top