Need help for a skill

Hey guys ! I use the action sequence pack (1-2-3) want to make a skill which power goes harder depending of the stacks of the States the enemy has been infected.

What I made. The skill executed adds once the state to the target (Let's call it minibomb)
and I made the skill trigger a common event "bomb counter" (ID : 27). Every times it is executed, it adds 1 to the variable [110], with the text (The enemy now has \v[110] minibombs)

And I want the "Kaboom" skill stronger or weaker depending of the variable, so, then remove them form the enemi. For this, I made the Kaboom skill trigger the 28th common event that put the counter down to 0 and removes them. But, I need to work the formula and the action sequence scheme. Here is what I made.

formula (I'm quite a noob concerning formulas, I'm quite sure it is wrong tho) :
if (b.isStateAffected(50)) {200 * v[110] + a.mat * 2 - b.mdf} else {0}; b.removeState(15)

Action sequence :
<setup action>

perform start

animation 149: user

wait: 40

</setup action>

<target action>

hide Battle Hud

wait: 40

motion chant: user

wait: 40

animation 283: user

animation 283: target

\\Si 0 bud

if ($gameVariables.value[110] == (0))

ADD STATE 26: user

elseif ($gameVariables.value[110] == (1))

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 15

motion chant: user

wait: 30

animation 170: target

wait: 40

action affect: target

elseif ($gameVariables.value[110] == (2))

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 30

animation 170: target

wait : 40

action effect: target

elseif ($gameVariables.value[110] == (3))

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

animation 170: target

wait : 40

action effect: target

elseif ($gameVariables.value[110] == (4))

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

animation 170: target

wait : 40

action effect: target

elseif ($gameVariables.value[110] == (5))

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

animation 170: target

wait : 40

action effect: target

show Battle Hud

</target action>

<finish action>

perform finish

</finish action>


There is no enter between them, but I hope you guys got it anyways. Thanks in advance.
You haven't stated what's actually wrong.
What happens when you execute the skill? What works and what doesn't ?

There are a lot of things wrong in design btw, for starters right now all enemies share the same minibomb counter (v110). I don't think that's what you want, but I can't be sure, and that's why I need you to state the exact design of your skill and what happens right now vs what should happen.
Oh sorry ! When I execute it, it goes the same way, regardless of the count of bombs. It does not even make the action I'm looking for.
Normally, it should go :

if 0 bud :
Inflict burn state to user (state id 26)
no animation
no damage to target
end

if one bud :
motion attack: user
animation on target
action effect: target
end

if two buds :
motion attack: user
animation on target
wait
motion missile: user, no weapon
animation on target
action effect: target
end

if three buds :
motion attack: user
animation on target
wait
motion missile: user, no weapon
animation on target
wait
motion attack: user
animation on target
end

if four buds :
motion attack: user
animation on target
wait
motion missile: user, no weapon
animation on target
wait
motion attack: user
animation on target
wait
motion missile: user, no weapon
animation on target
wait
action effect: target
end

if five buds :
motion attack: user
animation on target
wait
motion missile: user, no weapon
animation on target
wait
motion attack: user
animation on target
wait
motion missile: user, no weapon
animation on target
wait
motion attack: user
animation on target
action effect: target
end

Have I been clear enough ?
And both of the skills are 1-targeted skills.
The bomb you let on them are stacked and the number of stack is stocked in a variable.
You haven't answered the second question. Are enemies supposed to share the same minibomb counter v110?

Your javascript conditions are wrong btw:
It's
Code:
$gameVariables.value(variableId)
with parentheses, not with brackets.
I tried with paranthèses, not with brackets too and had the same thing.

Nope, Just one monster for one counter.
The actual syntax for if else statement taken from yanfly's help file:
Code:
if $gameSwitches.value(1)
         action effect
     else if $gameSwitches.value(2)
         action effect
        action effect
     else
        action effect
         action effect
         action effect
     end

You're writing elseif instead of else if.

So now that you've realized that all your enemies share the same minibomb counter, how do you plan to fix that?
I guess I will work on it, I didn't for now, as I chose first to figure out how the skill could work.
With the proper syntax fixes I've shown you, your action sequence should now actually process.
Now you'll need to find a way to make every enemy use a different minibomb counter and that's likely to be a tougher issue. Don't hesitate to share what you've tried if you need some pointers!
In case it does not work, I'll take the initial setup and make the second one an aoe that will reach as much as the bomb have been laid first.

If I understand it, I must use "else if $gameSwitches.value(110) == X", it would work ?
Code:
else if $gameVariables.value(110) == X
That should work.
You made two mistakes in your first post: you used elseif and $gameVariables.value[110]
<setup action>

perform start

animation 149: user

wait: 40

</setup action>

<target action>

hide Battle Hud

wait: 40

motion chant: user

wait: 40

animation 283: user

animation 283: target

\\Si 0 bud

if $gameVariables.value(110) == 0

ADD STATE 26: user

else if $gameVariables.value(110) == 1

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 15

motion chant: user

wait: 30

animation 170: target

wait: 40

action affect: target

else if $gameVariables.value(110) == 2

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 30

animation 170: target

wait : 40

action effect: target

else if $gameVariables.value(110) == 3

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

animation 170: target

wait : 40

action effect: target

else if $gameVariables.value(110) == 4

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

animation 170: target

wait : 40

action effect: target

else if $gameVariables.value(110) == 5

wait: 30

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

motion missile: user, no weapon

wait: 5

animation 57: target

wait : 25

motion attack: user

wait: 5

animation 57: target

wait: 25

animation 170: target

wait : 40

action effect: target

show Battle Hud

</target action>

<finish action>

perform finish

</finish action>




I used it and still, it does not work. It just performs start, then the animation 283 on actor and user as asked, then nothing. What should I do ?
So the part of your sequence before the if triggers, but not after.
What could be wrong ?
I don't know. Want me to take a video and give you the link, so you see ?
No, I have the answer to that question. I want you to go through the debugging process on your own.
What would cause the if statement to fail?
To be honest, I really do not know where it could mess, still, it does not work. I'll try it on a test skill.
How do you debug things?

Spoiler
Go through your action sequence line by line, check for syntax errors and points that could be the source of errors.
What's actually inside variable 110, maybe it's just not a value you've checked and thus nothing happens, maybe your syntax is wrong again, maybe it's both?
Found a typo in the number of the variables. It should work now ! Thanks for your help !
You're missing the "end" keyword in your action sequence too, for your if statements.
Thanks. Last question : I'm not english so I have quite some problems with plugin understanding but : The "Change Variable X = Y", how does it work ? Must I put "Change variable 0 = 153" if I want the 153rd variable to be set to 0 ?

Original thread: https://forums.rpgmakerweb.com/threads/need-help-for-a-skill.105531/