Unique Supertile Instance Mouse Events

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

Unique Supertile Instance Mouse Events

Postby ohanyan » 30 Aug 2011, 03:44

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.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 31 Aug 2011, 07:59

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.
Paolo Bax
The SmartFoxServer Team
ohanyan
Posts: 8
Joined: 10 Nov 2009, 23:13

Postby ohanyan » 07 Sep 2011, 22:49

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).
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 08 Sep 2011, 06:26

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.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 17 guests