Reacting just once when a state is inflicted during a battle

Labba

Warper
Member
Joined
Jan 14, 2018
Messages
2
Reaction score
0
First Language
Italian
Primarily Uses
RMVXA
There's a problem I don't really know how to fix.

During a boss battle, one of the heroes may be attacked with a spell that temporarily blinds them. I'd like them to say something along the lines of 'Ahhh, I can't see anything!', but only at the end of the turn during which the state is inflicted, and not also at the end of every turn in which the character is still blinded.

This is what I tried: I set a battle event that checks whether or not the hero is affected by the state; if they are, then the dialogue box with their reaction shows up. The problem is that...
  • if the span of the event is set on 'Battle', it never runs;
  • if the span of the event is set on 'Turn', it runs every single time a new turn begins and the hero is still affected by the state.
What should I do to have the event be activated only once?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
776
Reaction score
487
First Language
English
Primarily Uses
RMMV
Use an if statement, and a switch to make sure it only plays once.

if (x is affected by y)
if (switch is OFF)
"I'm blinded!"
turn switch ON
end
end
 

Ellie Jane

Veteran
Veteran
Joined
Mar 17, 2012
Messages
752
Reaction score
1,488
First Language
English (UK)
Primarily Uses
RMMV
^^ Just make sure that the switches are then reset afterwards for the next battle.
 

Labba

Warper
Member
Joined
Jan 14, 2018
Messages
2
Reaction score
0
First Language
Italian
Primarily Uses
RMVXA
It worked! Thank you so much!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top