Persistent Custom Tile Properties
Posted: 27 Jul 2011, 16:44
Hello,
I'm looking through the documentation and also the forums but i can't find anything related.
I was wondering if there is any way to set "custom properties" to the tiles in a map, and made them persistent between loads, it is very important to have this from code and not from the Open Space Editor.
To make things clear ill try to explain the intended use:
I have an editable map for the user, currently i can add things to this map, check inventory and everything. I want to be able to add multiple items of the same type (related to the same inventory item) but identify them as unique.
For example if I add 3 dogs to the map, i want to be able to add a property name each dog, and that those names persist between subsequent map loads.
The problem is that those dogs are all the same inventory item and, using getAllSkinsByName returns the array of the 3 dogs but no way to identify them, since movie clip is a dynamic class i can add those properties at runtime, but they won't persist in the map definition.
Any Ideas on how to implement this feature?
Any help is greatly appreciated
Ivan
I'm looking through the documentation and also the forums but i can't find anything related.
I was wondering if there is any way to set "custom properties" to the tiles in a map, and made them persistent between loads, it is very important to have this from code and not from the Open Space Editor.
To make things clear ill try to explain the intended use:
I have an editable map for the user, currently i can add things to this map, check inventory and everything. I want to be able to add multiple items of the same type (related to the same inventory item) but identify them as unique.
For example if I add 3 dogs to the map, i want to be able to add a property name each dog, and that those names persist between subsequent map loads.
The problem is that those dogs are all the same inventory item and, using getAllSkinsByName returns the array of the 3 dogs but no way to identify them, since movie clip is a dynamic class i can add those properties at runtime, but they won't persist in the map definition.
Any Ideas on how to implement this feature?
Any help is greatly appreciated
Ivan