Hi, so I have a few questions about the editor
I have this map I want to make and it's mainly data driven. I'm stuck at the moment because I really need a class to get what I'm after.
when you build a farm, it needs to have a lot of unseen data which can be linked together. for example, a villager will spawn, who has a level of wealth. the villager takes a home as his own, and the farm itself now recognizes that it belongs to the villager.
in a programmatic sense, I would have a list of <farm> class objects, which would each have a variable like <inhabitants>, which would be populated by a list of all the unit objects which inhabit it.
if the farm gets destroyed, it would get stricken from the list and each of it's inhabitants would have the farm struck from their <home> variable and become homeless.
the problem is I only really have arrays at the moment, I'm not sure if lists or classes exist in the world editor or JASS, and if I plan on having the data stored using arrays I think that I will either have massive amounts of empty array variables after a number of farms or villagers have died or otherwise been removed and I would also have to loop through every single unit if I wanted to check that the unit dying would be one from the list.
is there a better way to do this?
I have this map I want to make and it's mainly data driven. I'm stuck at the moment because I really need a class to get what I'm after.
when you build a farm, it needs to have a lot of unseen data which can be linked together. for example, a villager will spawn, who has a level of wealth. the villager takes a home as his own, and the farm itself now recognizes that it belongs to the villager.
in a programmatic sense, I would have a list of <farm> class objects, which would each have a variable like <inhabitants>, which would be populated by a list of all the unit objects which inhabit it.
if the farm gets destroyed, it would get stricken from the list and each of it's inhabitants would have the farm struck from their <home> variable and become homeless.
the problem is I only really have arrays at the moment, I'm not sure if lists or classes exist in the world editor or JASS, and if I plan on having the data stored using arrays I think that I will either have massive amounts of empty array variables after a number of farms or villagers have died or otherwise been removed and I would also have to loop through every single unit if I wanted to check that the unit dying would be one from the list.
is there a better way to do this?