this is a problem I have been trying to fix for several days, but I cannot find a solution to it…
I am making a fighting game, where the player characters are represented by one universal collection, which contains two instances of the same collection (representing the characters). Inside is the ‘Universal’ code which applies to all characters, and a lua file which contains functions dedicated to how each individual character operates.
Each character calls a third object which then returns a require address directly depending on player type, which then is executed on an individual basis, allowing unique stats from the init function.
The functions have all the same names between versions, and In normal gameplay, I can distinguish base functions like Init and Update between the two characters. However with non-local functions (remember these are LUASCRIPTS), are triggered on both entities, regardless if only one instanced is ‘hooked’ on the require.
Is there any way around this?