Animation of multiple normal attack

Discussion in 'Javascript/Plugin Support' started by Acydcross, Jul 11, 2019.

  1. Acydcross

    Acydcross Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Tagalog
    Primarily Uses:
    RMMV
    Hello!

    I have a class that has 'Attack Times +1' trait. It works ok, but the animation of the second attack is wrong. Instead of doing the same regular animation for normal attack, it looks toward the party and then attack. I want it to look like it's just doing a normal attack, but twice. I have a feeling it's because I'm using Yanfly's Action Sequence on 'Attack' skill. This is the action sequence for the attack:
    Skill #1 will be used when you select

    the Attack command.

    <setup action>



    display action



    immortal: targets, true



    </setup action>



    <target action>



    if user.attackMotion() !== 'missile'



    move user: targets, front, 20



    else



    perform start



    end



    wait for movement



    motion attack: user



    wait: 10



    attack animation: target



    wait for animation



    action effect



    </target action>

    I thank you for your time!
     
    #1
  2. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,623
    Likes Received:
    11,613
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA

    I've moved this thread to Plug-In Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. ramza

    ramza Lunatic Coder Veteran

    Messages:
    501
    Likes Received:
    282
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    The problem is with your action sequence. There is a... Bug for lack of a better term in the action sequence plugin. It's difficult to completely explain it, but the problem is that your move action which moves your battler beside the target is inside the <Target Action> section, so it is done once for each attack.
    When the first attack hits, the enemy flinches, moving the back a few pixels, causing your second attack to require the battle to move a few pixels further to get back in position. Due to some wonky check somewhere, the action sequence thinks the battler moved to the right, possibly because the new x position is inside the bounds of the battlers sprite box. Regardless, he faces right when he makes this slight correction.

    To fix this, perform the move action part of the sequence in the <Setup Action> section instead of the <Target Action> section. In most cases, the result will be the same, but because your double attack actor isn't trying to move twice, he'll never face backwards.
     
    #3
  4. Acydcross

    Acydcross Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Tagalog
    Primarily Uses:
    RMMV
    Oops. Sorry and thanks!

    It works! But, I have a character that uses a gun (range). Now she act a little funny.
     
    #4
  5. ramza

    ramza Lunatic Coder Veteran

    Messages:
    501
    Likes Received:
    282
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    @Acydcross For that you'll need to get fancy with if conditions to determine who is using the attack, or what wtype their weapon is, and move accordingly.

    Or find out where in the script it determines when to mirror the battler image, and adjust the x value of that to fix your original problem more directly.
     
    #5
  6. Acydcross

    Acydcross Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Tagalog
    Primarily Uses:
    RMMV
    Sorry for the late reply. Ok, I will try to configure how to do that. Thanks a ton!
     
    #6

Share This Page