ProtoflareX

Veteran
Veteran
Joined
Jul 16, 2013
Messages
40
Reaction score
5
First Language
English
Primarily Uses
The tutorial provided with the script states the following:

Assuming you have two states Weak Poison (12) and Strong Poison (13), you can
create a conditional state (14) that will add Strong Poison if Weak Poison is
already applied, or apply Weak Poison otherwise.

<conditional state>
if a.state?(12)
13
else
12
end
</conditional state>

However, the above only works with two states. I would like to use this script to make a conditional state that "stacks" five times. For example: On the first usage of a skill, "State 1" should be applied, then on the second usage, if state 1 is on the target, "State 2" should be applied, then on the third usage, if State 2 is on the target, "State 3 should be applied and so on until "State 5" is reached. I attempted to accomplish this on my own, but would get an error when I tried to apply the state in battle. Can anyone provide assistance?

Link to the script: http://himeworks.com/2014/01/conditional-states/
 
Last edited by a moderator:

EatYourBeetS

The Abysswalker
Veteran
Joined
Feb 23, 2015
Messages
96
Reaction score
30
First Language
Italian
Primarily Uses
How did you try to accomplish that? It should be quite simple with elsif:

Code:
if a.state?(15)16elsif a.state?(14)15elsif a.state?(13)14elsif a.state?(12)13else12end
 
Last edited by a moderator:

ProtoflareX

Veteran
Veteran
Joined
Jul 16, 2013
Messages
40
Reaction score
5
First Language
English
Primarily Uses
How did you try to accomplish that? It should be quite simple with elsif:

if a.state?(15)16elsif a.state?(14)15elsif a.state?(13)14elsif a.state?(12)13else12end
This works perfectly, thank you.
 

Latest Threads

Latest Profile Posts

Big Google Warning Today for chrome users - apparently some kind of security threat has happened and everyone is being advised to update their Chrome browser ASAP by going to settings and/or "About Google Chrome", to update their browser version to a new one just released.
Firefox pointed me to a little inspiration: https://www.atlasobscura.com/articles/writers-maps

So, I shared. :D
To be released 2021/10/21
Now that I made this "What the MZ RTP is missing" spreadsheet it's itching me to fill some the gaps D:
Aaaaand I completely forgot about the RMMV Chicken Rave my brother decided to implement in a parody of my VERY FIRST UNFINISHED project. We could not escape the chicken rave... The chickens would block the ladder...

Forum statistics

Threads
115,950
Messages
1,094,301
Members
151,209
Latest member
Viobat
Top