I created a table in json to save the levels of my game, I created it in SDK crown.
Does anyone know how to insert data into a json table from a Tiled map editor map? What I intend is to change a field from the custom attributes:
levels [2] = 2
and inserts it to me as text:
“levels [2] = 2”
The result should be this:
before inserting:
{“levels”: [1,1,1,1]}
After inserting from Tiled:
{“levels”: [1,2,1,1]}
I hope I explained myself well.
Can someone please help me?
The custom properties are properties rather than arbitrary code. Any processing on those properties has to happen in your engine. This means that instead of something like map: levels[2] = 2, you should instead have something like map: 2 and level: 2, and then put that into your game’s data structure when you read in the map in your game. This should ease the parsing, and it would make these properties easier to set, since their meaning would be clear from the property names.