Page 1 of 1

Knowing the current avatarposition on server-side

Posted: 19 Jul 2010, 08:23
by ffourcad
Hello, I'd like to know the current tile position of an avatar during his movement on server-side.

Posted: 19 Jul 2010, 15:23
by Bax
This is not possible. The server only knows the start coordinates and the end coordinates of the avatar movement.

Posted: 20 Jul 2010, 13:34
by ffourcad
How can we change the movement of an avatar during its course ?

Posted: 21 Jul 2010, 08:59
by Bax
On the client side:
- click on a new tile;
- call the moveMyAvatar method passing the new destination coordinates.

On the server side:
- call the moveAvatar method passing the new destination coordinates.

Posted: 22 Jul 2010, 07:10
by ffourcad
on server-side, when we use moveAvatar, it seems that the avatar finishes its current movement, before doing the new one. Which that if you move the avatar on a straight line, then ask him to move to a tile in the middle of this line, it first goes to the end of the line, then goes back to the tile in the middle.

Posted: 23 Jul 2010, 16:57
by Bax
Yes, you are right. If possible we will improve this by allowing you to pass a parameter causing the current path to be dropped and the new one started.
Thank you for pointing out.

Posted: 26 Jul 2010, 10:37
by TiagoR
On client side you can always do

Code: Select all

openSpace.stopMyAvatar()
and then

Code: Select all

openSpace.moveMyAvatar( coords )

Posted: 26 Jul 2010, 12:55
by ffourcad
Thank you, but i'm trying to stop other avatars than mine (NPCs in that case)

Posted: 02 Aug 2010, 13:08
by Nepaleno
Is it possible to know serverside if NPC is moving or standing at the moment?

The thing is I wanna send him to some position on map and perform some action when he's there. So serverside I gotta know if he's already there.

Posted: 02 Aug 2010, 14:47
by Bax
No, it is not possible to know if the avatar is moving or not, because animation is entirely managed by the client.

Posted: 03 Aug 2010, 13:56
by Bax
We further investigated the possibility of stopping the current avatar movement when the server-side moveAvatar method is called, instead of queuing the new path.
Unfortunately this is not possible, because the extension should know the current position of the avatar, in order to synchronize the starting position on all the clients.