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
onAvatarMovementEnd is being called more than once
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.
Also make sure you are not registering to that event each time a user enters the map.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team