MV Action Sequence with two different skills

Hello,

I'm blocking on an action sequence.

I would like that if the player is affected by a state, the player does additional damage based on another skill. I'm just starting out and I'm not sure if this is feasible but I prefer to ask just in case.

Here's my code for skill A, I put in bold where I can't solve the problem (it's not entirely mine):


<setup action>
clear battle log
display action
mmortal: targets, true
</setup action>

<whole action>
if user.attackMotion() !== 'missile'
move user: targets, front, 20
else
perform start
end
motion standby: user
wait for movement
face user: target
</whole action>

<target action>
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
if user.isStateAffected(334)
action effect of skill B

end
</target action>

Sorry for my English

Thank you for your help.
I found a solution to the problem that does not involve an event.

I have another problem however and it is a condition if problem.

I have the ParamsCore scsoft plugin and I have created a speed statistic.

Here is what the code looks like when it works halfway:
<target action>
if user.speed = 3
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
if (user.isStateAffected(344))
wait: 30
common event: 301

else if user.speed = 2
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
if (user.isStateAffected(344))
wait: 30
common event: 301
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
if (user.isStateAffected(344))
wait: 30
common event: 301

else
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
if (user.isStateAffected(344))
wait: 30
common event: 301
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
if (user.isStateAffected(344))
wait: 30
common event: 301
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
if (user.isStateAffected(344))
wait: 30
common event: 301
end
</target action>

When the player does not have the 344 state everything works as it should, but as soon as he has the state he makes only one attack.

I think the code is badly written because there is an if in an if.
I don't know how to improve the code to make it work.

Thank you for your help.

Translated with www.DeepL.com/Translator (free version)

Original thread: https://forums.rpgmakerweb.com/threads/action-sequence-with-two-different-skills.131579/