|
Re: quick question: TIMERS
That's all up in my post...
Make a "StateInit" function that runs everytime you move to a new state, that at the very least resets your count to 0. Put a count++; statement after the switch. Then, inside each case, say
if(count > someNumber){
StateInit();
state++;
}
That will move it to the next case when the count is above the number you want. Since you don't have a real timer you'll have to do the math yourself for how long to stay in each one but it shouldn't be that bad.
__________________
~Alex Baxter
Programming, Arms operation, Team 254
|