Stopping an avatar during the walk cycle.

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
lilshtz
Posts: 17
Joined: 16 Dec 2008, 15:32

Stopping an avatar during the walk cycle.

Post by lilshtz »

Is there a way to programmatically stop an avatar while it is walking to a tile? Something like openspace.stopMyAvatar() ?

use case:
* user clicks on a tile and beings walking
* user performs an action necessitating stopping the avatar (clicks a menu, etc )
* avatar stops walking before getting to it's destination.

Thanks.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Hi,
this is not possible.
Usually there is no need to stop an avatar when it is walking and the user clicks on something else in the GUI.
Chatting, selecting buddies, browsing information etc... all these stuff and a lot more can be done even if the avatar is still walking to the destination. We don't think it hurts.

If you interrupt the walk cycle to the decided destination you will need to communicate this to all the other players as well.
Unfortunately each other user might get this notification at different times causing the original Avatar to stop in different locations on each client and creating an out-of-synch situation.

Even if you would transmit the position in which the client actually was stopped you would still have synchronization problems because the Avatar animation does not start at the same exact time on all computers, and it's executed at slightly different speeds depending on each client's frame rate. This would become quite a complicated synchronization issue, which we don't think it's necessary to introduce in the OS engine.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply