Help with remove state

ShadowSFX

Villager
Member
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
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,230
Members
137,607
Latest member
Maddo
Top