Hey guys!
I’m picking up Defold to learn more lua and develop ZenRPG alongside it’s Game Maker/Unity versions.
But I need help understanding collections… From what I can gather from the documentation they’re prefabs/Unity or objects/game maker.
So in Game Maker I have a Player object so I’d have a player collection then, I also have a party object however this is ONLY for the game setup so this would actually then become our active party collection which handles: Adding, Removing, Swapping (Think JRPG “Formations” where you can swap the positions of a party member. So for Example I have a party of Guy1, Guy2, Guy3 I then swap Guy1 with Guy3 so Guy1s index was 0 it is now 2 (I assume arrays/dictionaries start at 0) and then Guy3 becomes index0 and also our Party Leader).
What I want to know is, how do I talk between collections? IE calling scripts, check if our game.collection with quest object with add Guy2 is finished then add guy2 to our party.collections?
In GM it’s easy, in Party just call script(argument) where argument will be the index in the party database but not the active party and if no party guy2 will have a index of 0 in the party as he’d be the first.
In Unity this is somewhat the same.