is there a way to turn a tile not walkable in runtime?
I´m dragging things into the tile and I don´t want the avatar to walk on it. The WALKABLE propertie is just read only.
Any help?
Turn Tile not Walkable in runtime
Turn Tile not Walkable in runtime
Fabio Colombini
Brazil
Brazil
Re: Turn Tile not Walkable in runtime
I suppose you are talking about OpenSpace.
In order to drag items on a map, they must have been created in the Editor using the Inventory Items section.
An inventory item is made of one or more existing tiles: if those tiles have their "walkable" property set to false, when the item will be place on another tile, avatar movement will be prevented.
In other word you don't need to change the floor tile walkability, just configure it on the item being dragged.
In order to drag items on a map, they must have been created in the Editor using the Inventory Items section.
An inventory item is made of one or more existing tiles: if those tiles have their "walkable" property set to false, when the item will be place on another tile, avatar movement will be prevented.
In other word you don't need to change the floor tile walkability, just configure it on the item being dragged.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Turn Tile not Walkable in runtime
Hi Bax,
And if we want to use a customized inventory?
We created a drag´n´drop item system that doesn´t need to enter in the "Edit mode", we needed it.
Is there a way to tell the tile that it´s not walkable?
[]s
And if we want to use a customized inventory?
We created a drag´n´drop item system that doesn´t need to enter in the "Edit mode", we needed it.
Is there a way to tell the tile that it´s not walkable?
[]s
Fabio Colombini
Brazil
Brazil
Re: Turn Tile not Walkable in runtime
This is not possible, sorry. The reason is that the "walkability" isn't a client-only property. In fact it affects the pathfinding algorithms, which run on the server side.
The default Edit Mode of OpenSpace collects the changes made to the map by the user and sends them to the server, which in turn updates the map, rebuilds the data structures required by the pathfinder and sends a notification to all the users on that map that a reload is needed.
This is why the walkability can't be changed on the client without entering the Edit Mode.
The default Edit Mode of OpenSpace collects the changes made to the map by the user and sends them to the server, which in turn updates the map, rebuilds the data structures required by the pathfinder and sends a notification to all the users on that map that a reload is needed.
This is why the walkability can't be changed on the client without entering the Edit Mode.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Turn Tile not Walkable in runtime
Ok, I understood.
So, wich is the best way to create "avatar´s home", as the map is for all users?
I´m creating dynamic roons and setiting the var _os_mapId to load the map, and I would save the itens position out of the map (into the DB) for each avatar.
Could you give me a direction, links to search how is the best way to create "Avatar´s home".
thanks
So, wich is the best way to create "avatar´s home", as the map is for all users?
I´m creating dynamic roons and setiting the var _os_mapId to load the map, and I would save the itens position out of the map (into the DB) for each avatar.
Could you give me a direction, links to search how is the best way to create "Avatar´s home".
thanks
Fabio Colombini
Brazil
Brazil
Re: Turn Tile not Walkable in runtime
Please read the implementation notes in the documentation of the server-side sendAvatarToMap method:
http://openspace-engine.com/static/serv ... atarToMap2
http://openspace-engine.com/static/serv ... atarToMap2
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 24 guests