Hello I'm trying to set the number of a global value to my current created sprite I made a variable in it which will hold that Number by the name of ID.
My goal is that when the object or sprite is created it will set the number of the global variable to the variable of Enemy.ID. After that a Function is called to apply all the value from and array to the Object. the monster is determinate by the ID.
But every time it create a Monster the Enemy.ID don't get the value of TestLevelMonsterID2 it is always appearing as 0 so it
just load the monster at index 0.
and I can't really see what is logically wrong I need your help guys.
I'll leave a picture of my code: