Page 1 of 1
Unique Supertile Instance Mouse Events
Posted: 30 Aug 2011, 03:44
by ohanyan
All of my InventoryItems are composed of SuperTiles. I would like to associate a unique event (or associate a unique identifier) to each instance of that InventoryItem when a user clicks on it.
How can I go about doing this?
Thank You.
Posted: 31 Aug 2011, 07:59
by Bax
Among the clicked tile properties you have the groupId. You can then call the IOpenSpaceAPI.getGroup(groupId:String) method to retrieve all the tiles belonging to that group.
Posted: 07 Sep 2011, 22:49
by ohanyan
How do I assign names to the tiles of a supertile when dragging the inventoryItem into the map in editMode. Currently I am able to assign tileInstName when dragging an inventory item Only if it is a Tile. The names of all the tiles for a groupId are "" when I use getGroup(groupId).
Posted: 08 Sep 2011, 06:26
by Bax
You can't, just like you can't do it in the Editor.
Tile names during the editing can be assigned only to single tiles, not to tiles belonging to groups.