- Joined
- Mar 15, 2012
- Messages
- 2
- Reaction score
- 2
- First Language
- English
- Primarily Uses
Hello. I'm having a bit of trouble with Action Sequences, particularly If-then-Else statements. (If this is in the wrong place, I apologize.)
What I'm trying to do is create a Skill, called Study Ally, that requires you to select one of your fellow party members, and then it gives the user a State that temporarily gives you a particular set of Skills, depending on the target's Class. For example: targeting the party Fighter will temporarily give you Power Attack, targeting the Rogue will give you Sneak Attack, the Wizard will give you Fireball, the Cleric will give you Cure Light Wounds, etc. Here is the Action Sequence I have written out so far:
<target action>
action animation: target
wait for animation
animation 36: user
if target.currentClass().id === 2
ADD STATE 16: user, (show)
else if target.currentClass().id === 3
ADD STATE 5: user, (show)
else if target.currentClass().id === 4
ADD STATE 10: user, (show)
else
ADD STATE 7: user, (show)
end
</target action>
Now, everything up to, and including, the first If statement works fine. It will check for the Class ID, regardless of which Class ID it is, and apply the correct state. The trouble is, if the target does not have the class ID that corresponds to the first If statement(which would then cause the sequence to check the Else-If statements), it will automatically act as if the first Else-If statement were true, regardless of which Class it actually is. So in the above example, choosing a target with Class 2 will give the correct result, but choosing a target with any other class will give a result as if it had Class 3, therefore applying State 5. I'm not sure if my notation is simply incorrect, or of there's something else at play.
For what it's worth, I am up to date with Battle Engine Core 1.28d, Sequence pack 1 1.10, Pack 2 1.07a, and Pack 3 1.02a.
What I'm trying to do is create a Skill, called Study Ally, that requires you to select one of your fellow party members, and then it gives the user a State that temporarily gives you a particular set of Skills, depending on the target's Class. For example: targeting the party Fighter will temporarily give you Power Attack, targeting the Rogue will give you Sneak Attack, the Wizard will give you Fireball, the Cleric will give you Cure Light Wounds, etc. Here is the Action Sequence I have written out so far:
<target action>
action animation: target
wait for animation
animation 36: user
if target.currentClass().id === 2
ADD STATE 16: user, (show)
else if target.currentClass().id === 3
ADD STATE 5: user, (show)
else if target.currentClass().id === 4
ADD STATE 10: user, (show)
else
ADD STATE 7: user, (show)
end
</target action>
Now, everything up to, and including, the first If statement works fine. It will check for the Class ID, regardless of which Class ID it is, and apply the correct state. The trouble is, if the target does not have the class ID that corresponds to the first If statement(which would then cause the sequence to check the Else-If statements), it will automatically act as if the first Else-If statement were true, regardless of which Class it actually is. So in the above example, choosing a target with Class 2 will give the correct result, but choosing a target with any other class will give a result as if it had Class 3, therefore applying State 5. I'm not sure if my notation is simply incorrect, or of there's something else at play.
For what it's worth, I am up to date with Battle Engine Core 1.28d, Sequence pack 1 1.10, Pack 2 1.07a, and Pack 3 1.02a.

