RhenaudTheLukark / CreateYourFrisk

Rhenaud The Lukark's Unitale fork
GNU General Public License v3.0
132 stars 56 forks source link

Add ability to access enemy scripts by name #99

Closed deonix37 closed 3 years ago

deonix37 commented 3 years ago

Like enemies.poseur or enemies['poseur'], besides enemies[1]. I'm not sure where to document this

DimitriBarronmore commented 3 years ago

One of the advantages of the enemies table being an array is that the same monster script can be used multiple times in the same encounter to have multiple of one monster. This would cause only one of those monster scripts to be accessible by name, and require the other(s) to be accessed by numeric index as normal.

The monster table is a table, and the monster scripts can be saved to variables. If you want to have named access to monster scripts, go into EncounterStarting and put down something along the lines of enemies.poesur = enemies[1] manually instead of clumsily slotting it into the engine.

AllyTally commented 3 years ago

god i cant wait to access the fourth poseur enemy in my battle image