Quote:
|
Originally Posted by Xufer
huh ? dun quite get it, too tired maybe ...
|
Instead of stead of what you currently have, you'd put in something like his example. The basic idea is laid out below: (in semi-pseudo-code)
Code:
Static state variable starting at 0
switch(state variable)
{
case 0:
perform actions set 1
check if this state is complete
if it is, increment the state variable
case 1:
perform actions set 2
check if this state is complete
if it is, increment the state variable
case 2:
perform actions set 3
check if this state is complete
if it is, increment the state variable
...
case X:
don't do anything
}
By repeatedly calling this switch statement, it will work its way through all the states. You can, of course, also have statements in there that reset the statee variable, or put it to where ever you want.
Hope that clarifies it some.