Thread: onwater()
View Single Post
  #6  
Old 06-04-2010, 11:44 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Have you considered using the built-in move? I know this probably doesn't fix your current problem but just something that could benefit you down the line.

Here's a little example of what's possible:

PHP Code:
//#CLIENTSIDE

function onCreated() {
  
showcharacter();
  
setTimer(0.05);
}

function 
onTimeout() {
  
// Move to a random location in 2 seconds.
  
moveTo(random(064), random(064), 2);
  
// Wait till movement complete
  
waitfor(this"MovementFinished");
  
// Continue looping
  
setTimer(0.05);
}

function 
moveTo(txtytime) {
  
// Determine Movement Deltas (Final take away Initial)
  
temp.dx tx this.x;
  
temp.dy ty this.y;
  
// Set New Direction
  
this.dir getdir((this.dx) - this.x,(this.dy) - this.y);
  
// Set Movement Animation
  
setcharani("walk""");
  
// Move (The 8 at the end is so the MovementFinished event is called)
  
move(temp.dxtemp.dytime8);
}

function 
onMovementFinished() {
  
setcharani("idle""");

__________________
Quote:
Reply With Quote