I just came up with a theory about why people may be having this problem. Is it possible that when you assign a global struct to an instance and delete that instance, it stays associated with that instance? When you re-battle an enemy, the enemy's instance that was created has a different id to the previous instance that was destroyed.
This occurs when you re-battle an enemy, battle an enemy of the same type, or exit and re-enter the room before re-battling the enemy. Is there a way to refresh global structs to their condition at game start?
EDIT: I fixed the bug!
Instead of doing this:
global.enemies = { slimeG:I re-rote the enemies list to be more in line with the players list:
{ name: "Slime",
global.enemies = [ { name: "Slime",Instead of doing it the way Shaun had implemented it, I assigned a unique integer value to each enemy and manually assigned each enemy's name to an enumerator:
oBattleUnitEnemy,enemies[i]); oBattleUnitEnemy,global.enemies[enemies[i]]);
I advise everyone facing this problem to do what I did.