Restrict user avatar moving further

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

Moderators: Lapo, Bax

Madhav
Posts: 78
Joined: 27 Nov 2012, 04:41

Restrict user avatar moving further

Postby Madhav » 28 Feb 2013, 06:03

Hi.... :D
Need some help on this,,,
I have created a openspace map and it has got non-walkable area as well as some walkable area in the middle of the map....
So I need user avatars to walk only in the middle walkable portion but when the user clicks on the non-walkable portion i need user avatar to move in that angle till it reaches the last walkable portion.

So I thinks to make this happen I need to fill whole map with walkable tiles....
But the problem is to stop the avatar when it reaches that certain tile which is in the end of walkable portion and stop moving it further but can walk back in walkable portion.

I suceeded in stopping avatar when it reaches the end of walkable portion but trigering avatar-enter and using stopMyAvatar but need help on how to stop it from moving further when use again tries to click on non-walkable portion....

Please HELP....
Thanks....
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Restrict user avatar moving further

Postby Bax » 28 Feb 2013, 08:56

What you need is implementing the IOpenSpaceAPI.preAvatarMoveValidator function. Check the API documentation form more informations.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 40 guests