Thread: function...
View Single Post
  #23  
Old 05-22-2007, 10:28 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Deadly_Killer View Post
Explain why you would waste a timeout on the clientside for 0.05 for something like this.

This is the best solution without creating wasteful timeouts for events. Besides the current events do the same thing too.
Still, you've just ignored my question! Why are you checking if a player has moved?
If anything, send it to the selected weapon. You could even make it a flag.

HTML Code:
//#CLIENTSIDE
function onCreated()
{
  setTimer(0.05);
}
function onTimeout()
{
  if (player.currentPosition[0] != player.x || temp.currentPosition[1] != player.y)
  {
    player.currentPosition.clear();
    player.currentPosition.addArray(0, {player.x, player.y});
    player.isMoving = true;
  }
    else
  {
    player.isMoving = false;
  }
}
Although, a built in event would be better!
__________________
Reply With Quote