K
Kamon145
Guest
Hello everyone, I've been using a state system with a switch statement in my step event to keep things organized and only running what needs to run, Ive been doing it by setting up a variable in the "create" event thats something like
state = "idle"
with quotations indicating i am assigning a word, and in my step event:
switch(state)
{
case "idle":
{
idle_script;
}break;
ect ect.. This system has been working for me but Ive been looking at how other people do it and most seem to include setting up enums or something similar. I have not found many examples of people doing it the way I have been doing it so that leads me to wonder, is there anything wrong with doing it the way Ive been doing it, with variables assigned to words? Will this cause me problems on bigger projects or is it just considered bad practice?
Any input is appreciated, like I said I haven't really encountered any problems with this system.. yet.. But I would like to know ahead of time if there is a problem! Thanks!!
state = "idle"
with quotations indicating i am assigning a word, and in my step event:
switch(state)
{
case "idle":
{
idle_script;
}break;
ect ect.. This system has been working for me but Ive been looking at how other people do it and most seem to include setting up enums or something similar. I have not found many examples of people doing it the way I have been doing it so that leads me to wonder, is there anything wrong with doing it the way Ive been doing it, with variables assigned to words? Will this cause me problems on bigger projects or is it just considered bad practice?
Any input is appreciated, like I said I haven't really encountered any problems with this system.. yet.. But I would like to know ahead of time if there is a problem! Thanks!!