View Single Post
  #34  
Old 01-08-2007, 09:59 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by _Z3phyr_ View Post
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 ( 
0<= 2i++ )
  {

    
player.x++;

  }


Makes much more sense
Reply With Quote