I am trying to make a game in which you take care of, and build an army of, monsters. The idea is to use a single object to store all the information of the monsters, much like how this is done in pokemon, where each pokemon has variables to determine its species, its stats, and so on. However, I am unsure how to do this, especially when each monster will have several animations of them, for example, walking around, eating, and fighting. Would it be better to do this by having some sort of array to store information on what monsters you have and then summon in monster objects and have a separate object for each monster, or what? I’m completely lost here, and worried that I may have to put off the game until I’m more experienced unless I get help with this.
For the animations you can use an “offset” to select the right animations. Let’s say you always have exactly 6 animation per
pokemonmonster, and an object variable “specie” to describe what monster it is. Then Everytime you want to do something with the animation, do it like (number of animation from 1 to 6) + offset(the current value of object variable “specie” times the number of animations of each monster, here let’s say for the specie 5 then its 5x6).
Brilliant, thank you! And then the stats will just be object variables on each monster, right?
You can also make a struct containing the stats for each monster id; a struct looking like this:
Stats (struct) -0 (struct) --hp (23) --maxhp (56) -1 (struct) ...etc.
And access it like this:
Do= Variable(Stats[ObjectVariable("species")]["hp"]) to variable Temphp
This is only out of memory correct it to a valid statement.