Well, last time I had the problem I was just changing the ways I was using existing ones.
But this time, I'm trying to define a custom variable from scratch for Game_Battlers, it's needed on both actors and enemies. I've tried both putting it in Game_Battlers, and putting a copy of it into each of Game_Actors and Game_Enemy. No luck either way.
While I don't get any error messages, the value doesn't change as it should.
I have this in Game_Battlers3, just below where damage is subtracted from HP(in both skills and physical attacks):
And this in Game_Battler1 (I also tried putting this into Game_Actor and Game_Enemy):
While it doesn't give any errors, the value doesn't seem to be changing - even though the functions are executing (which I can confirm by intentionally putting code in them that will crash the game).
Any suggestions?
EDIT: Should probably mention... XP.
But this time, I'm trying to define a custom variable from scratch for Game_Battlers, it's needed on both actors and enemies. I've tried both putting it in Game_Battlers, and putting a copy of it into each of Game_Actors and Game_Enemy. No luck either way.
While I don't get any error messages, the value doesn't change as it should.
I have this in Game_Battlers3, just below where damage is subtracted from HP(in both skills and physical attacks):
Code:
if self.damage > 0
breakoutup = [(self.damage * 70) / self.maxhp, 5].max
self.breakout += breakoutup
if (self.breakout == 100) && self.is_a?(Game_Enemy)
$Game_Switches[51] = 1
end
end
And this in Game_Battler1 (I also tried putting this into Game_Actor and Game_Enemy):
Code:
def breakout
if @breakout > 100
@breakout = 100
end
if @breakout < 0
@breakout = 0
end
return Integer(@breakout)
end
def breakout=(brkout)
@breakout = brkout
if @breakout > 100
@breakout = 100
end
end
While it doesn't give any errors, the value doesn't seem to be changing - even though the functions are executing (which I can confirm by intentionally putting code in them that will crash the game).
Any suggestions?
EDIT: Should probably mention... XP.