Quote:
Originally Posted by _Z3phyr_
This stuff
PHP Code:
function onTimeout() {
for (i=0;i<=2;i++) {
player.x+=i;
}
this.setTimer(.5);
}
only moves me by whatever i is set to (in this case 0 tiles), so it doesn't work (I said it because it doesn't work -- as a tip that its not the right answer).
And how about an answer in GS2? English doesn't really help me.
|
Why not just do a for loop that increses the player's X position?
Example:
PHP Code:
function onPlayerTouchsMe()
{
for ( i = 0; i <= 2; i++ )
{
player.x++;
}
}
Makes much more sense
