Maybe something like this.
Initialize the select parameter before your loop that is executing the other stuff:
// we want to start with getting the time
Parts = 0
Now, add some bits to the select to let it do the work (this assumes this is getting executed in some loop and that you have a Sync() call sometime):
select Parts
case 0:
// grab the current time
partTime# = Timer()
// go to next 'state' to check the time
Parts = 99
endcase
case 99:
// check elapsed time for state change
// if we have passed far enough, move on to next state
if (Timer() - partTime#) > 1.0 then Parts = 1
endcase
case 1:
// set the position
SetSpritePositionByOffset(Tree, 1000+x, 300)
// check elapsed time for state change
// if we have passed far enough, move on to next state
if (Timer() - partTime#) > 13.0 then Parts = 2
endcase
case 2:
// set the position
SetSpritePositionByOffset(Tree3, 1000+x1, 300 )
x2=500
// check elapsed time for state change
// if we have passed far enough, move on to next state
if (Timer() - partTime#) > 21.0 then Parts = 3
endcase
case 3:
// set the position
SetSpritePositionByOffset(Statue, 1000+x2, 325 )
// check elapsed time for state change
// if we have passed far enough, move on to next state
if (Timer() - partTime#) > 24.0 then Parts = 0
endcase
endselect
I added a time check in case 3 so that the position set there would stick around for a few seconds before going back to the previous position.
Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master