I'm using xml files as maps. I would like to create objects based on xml tags. Currently, I seem to have to read in a line from the file and then have a condition for every different kind of object which exists and then create that object.
Here's a crude psuedo code version of the events:
for each node in xml:
if node.name = "skeleton":
create skeleton
set xlocation
set ylocation
if node.name = "hippy":
create hippy
set xlocation
set ylocation
I would prefer to do this is a dynamic fashion:
for each node in xml:
createObjectByName "skeleton"
set xlocation
set ylocation
Is there a way to do this in Construct 2?