Page 1 of 1
SKIN_CLICK does not work after Edit Mode
Posted: 15 Oct 2011, 03:16
by ohanyan
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?
Posted: 17 Oct 2011, 08:51
by Bax
In edit mode the triggers are disabled. They only work in play mode.
Posted: 17 Oct 2011, 14:50
by ohanyan
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.
Posted: 18 Oct 2011, 08:10
by Bax
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.
Posted: 19 Oct 2011, 18:07
by ohanyan
Yes, I do see that. So I checked everything against the sample project and there is no difference. Can you tell me what else may cause this issue? Also, we have a custom extension that handles map saving. Can the problem come from that?
Thanks
Posted: 20 Oct 2011, 06:55
by Bax
No idea at all. And I don't think the way map data is saved has anything to do with this issue. Would you be able to send the map and assets to us, for a local test?
Posted: 27 Oct 2011, 20:46
by ohanyan
I was able to get this working by setting
Code: Select all
openSpace.userInteractionEnabled = true
every time the user leaves edit mode.

Posted: 29 Oct 2011, 04:48
by Bax
Great.