[Ace] Help with Tsukihime's Conditional States

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.
 

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,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top