Counts the objects in one of Tiled's object layers. Takes map (The map's handle), layerName (The name of the object layer in Tiled). Returns: The number of objects, 0 if there is no such layer.
map
Int
layerName
String
For i:Int = 0 To tmObjectCount(map, "things") - 1
Spawn(tmObjectType(map, "things", i), tmObjectX(map, "things", i), tmObjectY(map, "things", i))
Next