Step0. edit tmx file by Tile map editor. Ensure the compression type to Base64 (uncompressed) or CSV
<img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-20.png" border="0" />
Step1. add "Action:Import tmx string",user can put string from tmx file or AJAX
Step2. add "Action:Set instance position of (0,0)". This action is used to tell plugin the real position of logically (0,0). (It's an offset of whole tiles)
Step3. add "Action: Create tiles". This action will
- a. create instances from tmx string
: layer name will be the same as in tmx
<img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen4-1.png" border="0" />
: x, y position will be calculated by logically index add offset (set in step2)
: set frame index by tmx tile id
<img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen2-8.png" border="0" />
- b. for each instance, put this instance into SOL
- c. (for each instance) then trigger "Condition:On each tile cell". User can get other data from "expression:LayerProp, TilesetProp, or TileProp". (User can edit these properties in tile map editor.)
Or use array object to store the "logic position to uid mapping". this array object is using to maintain the "logic world".
Step4. add "Action:Release tmx object" to release all data. After this action, "Action: Create tiles" will no longer to create instances.