I have an actor with two skills. The first increases the value of a variable. The second deals damage based on the value of said variable and sets it to 0.
The issue here is that since I'm using variables the stacks carry over after battles, meaning the player could get these stacks to ridiculous levels and oneshot everything.
Is there a way to make it so the value of the variable is set to 0 after every battle?
Sweet. I was considering using an autorun or parallel process common event, but it would have probably wiped the variable during the battle.
You could also make a autorun Common event., you don't "need" to use a script(although if you're gonna have a metric ton of these types of spells, it would probally be easier)
"Sweet. I was considering using an autorun or parallel process common event, but it would have probably wiped the variable during the battle."
No Common events can't autorun in battle, I have a similar spell set in my game, and autorun common event doesn't take effect in battle, when turning on the switch, that the autorun event requires(it will only take effect after battle(aka you're back on a map).
Would anyone mind helping me with this? Because I mean...
#-------------------------------------------------------------------------- # * End Battle # result : Result (0: Win 1: Escape 2: Lose) #-------------------------------------------------------------------------- def self.battle_end(result) @phase = nil @event_proc.call(result) if @event_proc $game_party.on_battle_end $game_troop.on_battle_end $game_variables[1] = 0 SceneManager.exit if $BTEST endAside from the variable ID it's exactly like above and the variable's value still doesn't reset to 0. Did I somehow put it in wrong? In case it helps, I have some other scripts for a target arrow (Victor's, specifically) but even after removing those to see if maybe somehow that was the issue the value still never went back to 0.
EDIT: Nevermind, it turns out that's not the issue but something else. Carry on.