View Single Post
  #30  
Old 12-20-2006, 08:31 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by _Z3phyr_ View Post
quite


anyway, what's the answer again?
Quote:
Originally Posted by _Z3phyr_ View Post
PHP Code:
function onTimeout() {
  for (
i=0;i<=2;i++) {
    
player.x+=i;
  }
  
this.setTimer(.5);

That would increase the player's x with 0, then by 1, and then by 2..

You could try to add a speed variable, instead of adding the variable of the loop, which is being increased,
(because of the loop speed it would be like, 2 forward, then 1, then 2 forward and 1 forward, would look weird)

To make something near the move() command, but to effect the player, I would use cos, sin and getangle
__________________
Reply With Quote