- Joined
- Jan 9, 2016
- Messages
- 20
- Reaction score
- 0
- First Language
- Spanish
What i would like to do is to have a state that runs until the start of the beginning of the actor.
Specifically i would like, for example, to remove the Guard effect at the beginning of the actor's turn. For this, since i'm using yanfly's buff states core, i can use a notetag inside the "guard" state:
<Custom Turn Start Effect>this.removeState(2)</Custom Turn Start Effect>This does work in the sense that, if i have a state that runs until i get damage, if i don't get damage at all and it is that actor's turn again, it will still have that state's benefits BUT as soon as i select an action, let say "Attack", it will remove the Guard state and it will attack normally returning everything how it should be. In this example, if i didn't have those notetags and selected "Guard" on actor A, whenever actor A's turn is up again, he will be able to attack AND still have the "Guard" state.
Now, the issue is that even if this works, it doesn't look right since, at the beginning of the turn the actor will still have the "guarding" sprite plus the "Guard" icon, and the correct behaviour should be removing the state, the icon and have the waiting on action stance animation.
I thought i could make a small script that would do that by just calling:
if Game_Battler.prototype.isGuardWaiting() {Game_Battler.prototype.removeState(2);}
But i'm not sure in what function should i call that since there is no "OnTurnStart".
Can i get some help please? xD
Specifically i would like, for example, to remove the Guard effect at the beginning of the actor's turn. For this, since i'm using yanfly's buff states core, i can use a notetag inside the "guard" state:
<Custom Turn Start Effect>this.removeState(2)</Custom Turn Start Effect>This does work in the sense that, if i have a state that runs until i get damage, if i don't get damage at all and it is that actor's turn again, it will still have that state's benefits BUT as soon as i select an action, let say "Attack", it will remove the Guard state and it will attack normally returning everything how it should be. In this example, if i didn't have those notetags and selected "Guard" on actor A, whenever actor A's turn is up again, he will be able to attack AND still have the "Guard" state.
Now, the issue is that even if this works, it doesn't look right since, at the beginning of the turn the actor will still have the "guarding" sprite plus the "Guard" icon, and the correct behaviour should be removing the state, the icon and have the waiting on action stance animation.
I thought i could make a small script that would do that by just calling:
if Game_Battler.prototype.isGuardWaiting() {Game_Battler.prototype.removeState(2);}
But i'm not sure in what function should i call that since there is no "OnTurnStart".
Can i get some help please? xD
Last edited by a moderator:

