Action Sequence Check State

Hi everybody,

I struggle with one thing, I can't find the solution.

Description of the state : Possessed = The battler attack his friends.

I want to check if my active battler has a specific state,

if yes he launch his attack without QTE (timed attack)
if not he launch his attack with QTE (timed attack)

My code (doesn't work :blush:) :

<Timed Attack: weapon>
<Use Timed Attack Action Sequences>

<Target Action>
if user.attackMotion() !== 'missile'
Move USER: TARGET, FRONT, 15
Wait for movement
else
Perform start
end
Wait for movement

if ($gameParty.leader().isStateAffected(17))

Perform action
Motion wait: user
action animation
wait for animation
action effect
death break

else
timed attack
Perform action
Motion wait: user
action animation
wait for animation
action effect
death break

end
clear battle log
perform finish
wait for movement
</target action>

Thanks 👍
Bump please 😀

Should be easy but I don't know that much about lunatic code :blink:

Original thread: https://forums.rpgmakerweb.com/threads/action-sequence-check-state.91186/