groupId for MAP_ITEM_REMOVED / MAP_ITEM_ADDED

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

Moderators: Lapo, Bax

ohanyan
Posts: 8
Joined: 10 Nov 2009, 23:13

groupId for MAP_ITEM_REMOVED / MAP_ITEM_ADDED

Postby ohanyan » 15 Oct 2011, 03:14

How can I find out the groupId when an item is Removed from (OpenSpaceEvent.MAP_ITEM_REMOVED) or Added to (OpenSpaceEvent.MAP_ITEM_ADDED) a map in edit mode.

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

Postby Bax » 17 Oct 2011, 05:26

For the MAP_ITEM_ADDED event, you can just get one of the Tile objects provided in the event parameters, and read its groupId property.
For the MAP_ITEM_REMOVED you don't have the same, so you should save a reference to it when the MAP_ITEM_SELECTED event is dispatched.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 42 guests