Quote:
Originally Posted by Deadly_Killer
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!