Need help for a skill

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
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.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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.
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
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 ?
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
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.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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.
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
I tried with paranthèses, not with brackets too and had the same thing.

Nope, Just one monster for one counter.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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?
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
I guess I will work on it, I didn't for now, as I chose first to figure out how the skill could work.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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!
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
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 ?
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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]
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
<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 ?
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
So the part of your sequence before the if triggers, but not after.
What could be wrong ?
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
I don't know. Want me to take a video and give you the link, so you see ?
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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?
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
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.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
How do you debug things?

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?
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
Found a typo in the number of the variables. It should work now ! Thanks for your help !
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
You're missing the "end" keyword in your action sequence too, for your if statements.
 

Iliassine

Rider.
Veteran
Joined
Dec 14, 2016
Messages
90
Reaction score
3
First Language
French
Primarily Uses
N/A
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 ?
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top