Handling level objects that alter player behavior

Schwee

Member
Hey all,

So I'm working on what I plan to be a larger scale game. I am getting to a point where all the basic behavior is working which is about 700+ lines in the Step Event including comments etc, but anyways, I am wondering how I am going to handle the various objects/elements throughout the game that will alter behavior. At this point, I definitely don't have a full list of what types of stuff I will be using but some examples could be like ice, trampoline type platforms, gravity alteration, etc. Is all of this stuff ultimately all going to get executed in the step event?

I don't expect any concrete answers but I'd love to hear your thoughts.
 

YoSniper

Member
Yes, pretty much all object behavior is meant to go into the Step Event.

One really nice thing about GM:Studio, though, is that you can break up your Step Event into several pieces of code and use a triple-comment "///" to give them a title.

For example, you can have a section that handles ice physics, another that handles gravity, and so on.

Each section is executed independently, though, so any conditions common to all of them will either have to be imposed by way of Drag and Drop or just copy/pasted in each section.

And whatever you do, don't make the mistake of putting the "exit" keyword in any one section. That completely exits the Step Event and no other code beyond that would get executed.
 
Top