Page 1 of 1

onAvatarMovementEnd is being called more than once

Posted: 06 Jan 2009, 22:19
by pt_dev
Hi,

I am having hard time to figure out what is going on with the function.
What I am trying to do is that whenever an avatar stops then call extension to save location such as x and y coordinates. However, somehow, the extension has being called same number of time as number of user log in such as if there are two users login then extension will be called twice.

FYI, I don't use any loop.


any help would be appreciated. Let me know if you need more information.


Thanks,
- pt_dev

Posted: 09 Jan 2009, 16:25
by Bax
The "onAvatarMovementEnd" is fired by all the avatars moving on your client, so you will have to "filter" those events and catch only those related to your own avatar (by means of the avatar id contained in the event's parameters).
Also make sure you are not registering to that event each time a user enters the map.

Posted: 13 Jan 2009, 20:56
by pt_dev
Thanks bax.