Hi,
I’m trying to export an array of numbers from custom properties into a LUA file.
Can someone help me work out how I turn the exported data from this:
properties = {
["delay"] = "0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5",
["final_delay"] = "2,2,2,2,2,2,2,2",
["sequence"] = "3,1,3,1,3,1,3,1"
}
Into this:
properties = {
["delay"] = {0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5},
["final_delay"] = {2,2,2,2,2,2,2,2},
["sequence"] = {3,1,3,1,3,1,3,1},
}
For single integer values within custom properties the data gets exported correctly but for an array, I can’t work out how to export this data without setting it first as a string within Tiled, which then exports the data with quotes and not curly braces.
Any help or suggestions is appreciated.
Thanks.
Stoo