I have defined a trigger for a skin (the tile is not walkable).
When I add the item in edit mode, the MapInteractionEvent.SKIN_CLICK event is not dispatched. But if I reload the app with the item now in the map, it all works beautifully.
How can I work around this?
SKIN_CLICK does not work after Edit Mode
bax wrote:In edit mode the triggers are disabled. They only work in play mode.
I wasn't clear. The SKIN_CLICK triggers aren't firing after leaving Edit Mode. I enter edit mode, move things around, leave edit mode (map is updated successfully) but then the triggers aren't fired in play mode any more.
Not sure what you are doing wrong, but I just tested this using our live demo here, and it works as expected.
Try it yourself: enter one of the maps, go to edit mode, load the inventory and drag the rocking chair item on the map. It has a skin click trigger attached to it. When you leave the edit mode and click the chair, you will see it rock without the need to reload the map.
Try it yourself: enter one of the maps, go to edit mode, load the inventory and drag the rocking chair item on the map. It has a skin click trigger attached to it. When you leave the edit mode and click the chair, you will see it rock without the need to reload the map.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
I was able to get this working by setting every time the user leaves edit mode.
Code: Select all
openSpace.userInteractionEnabled = true
Code: Select all
OpenSpaceEvent.EDIT_MODE_LEFT
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 36 guests