![]() |
move() bug?
What I'm doing:
PHP Code:
After using the move() command, to move my "bomypet", on Graal2001 Dev, it doesn't trigger at correct place anymore. Anyone knows why? The triggeraction is done clientside, the move() part serverside. The move() part is in a joined class, not the one the triggeraction is being sent to, maybe the this.x and this.y aren't updating correctly? Who knows.. maybe you! |
*cough* Outdated function *cough* just use the this.x+(movement)*speed or whatever and update the timing so its smoother.
|
Quote:
Also.. x + 1, and y + 1.. try x, y or x + 0.5, y + 0.5 And make sure its setshaped on the clientside I think. |
I haven't used move() in a longg time
|
Quote:
|
Quote:
PHP Code:
|
This doesn't fix my bug.. :(
|
move()'s movement is handled on the clientside.
When the move() time runs out, it updates the position on the serverside. You'll have to trigger the server .05 or .1 seconds after it finishes moving, or schedule an event in the serverside to be called when it finishes moving. |
server lag
|
if (movementfinished) {
not sure what that is in GS2...or if it is actually real x_x. Saw it used in a script but I can't say whether it worked or not. |
Quote:
2. I'm using move() serverside, and double clicking action is clientside. I tried this: Serverside (when movement was done); this.attr[ 20] = this.x; this.attr[ 21] = this.y; Clientside; triggerAction( this.attr[ 20] + 1, this.attr[ 21] + 1,..... But it did not work. |
Quote:
Your little x+(movement)*speed is what is outdated. That is how it was done before the NPC Server was introduced. |
Well I was told a long time ago to stop using it cause
A. It was buggy as heck B. It was going to be outdated So from that point on I just wrote all custom movement, this was going back to like Enigma when it was only me a Warcaptain making things on there. |
| All times are GMT +2. The time now is 07:45 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.