Yanfly Action Sequence - Making characters move without turning around

Discussion in 'Javascript/Plugin Support' started by ze1, Aug 27, 2018.

  1. ze1

    ze1 Veteran Veteran

    Messages:
    30
    Likes Received:
    4
    Location:
    Brazil
    Hi! I made a skill animation using Yanfly's plugin. It works well, but the problem is at the end. When the character goes back to his original position (move user: home, 12), he turns back before moving. So, in the player's case. He moves left, uses his skill, turns right and moves right back to his original spot.
    I'd like to remove that turn right part, since it looks a bit awkward specially when enemies use the skill. So, in this case, I'd like the player to move right while facing left. Is it possible to do that?


    Code:
    <setup action>
    DISPLAY ACTION
    move user: forward, 32, 12
    wait for movement
    motion attack: user
    </setup action>
      
    <whole action>
    animation 2666: target
    wait for animation
    ACTION EFFECT: target
    wait: 30
    </whole action>
    
    <target action>
    </whole action>
    
    <finish action>
    CLEAR BATTLE LOG
    move user: home, 12
    wait for movement
    face user: forward
    </finish action>
     
    #1
  2. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    612
    Likes Received:
    344
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    You can't really stop them from turning around- what you can do is turn them back around immediately:
    Code:
    move user: [movement parameters]
    face user: [direction of choice]
    wait for movement
    The second line runs on the same frame as the first, so there's no chance for the player to see them facing the "wrong" direction.
     
    #2
    ze1 likes this.
  3. JGreene

    JGreene Veteran Veteran

    Messages:
    375
    Likes Received:
    287
    First Language:
    English
    Primarily Uses:
    RMMV
    I want to say that using return instead of home doesn't change the character's facing. It works with a skill I made, but that was an enemy skill.
     
    #3
    ze1 likes this.
  4. ze1

    ze1 Veteran Veteran

    Messages:
    30
    Likes Received:
    4
    Location:
    Brazil
    I updated the finish action part of the code to

    Code:
    <finish action>
    CLEAR BATTLE LOG
    move user: home, 12
    face user: away from home
    wait for movement
    face user: forward
    </finish action>
    And that gave me this error

    Code:
    ReferenceError: target is not defined
        at Game_Actor.Game_Battler.spriteFaceAwayHome 


    Yeah! Using return worked! Thanks :D

    Code:
    <finish action>
    CLEAR BATTLE LOG
    move user: return, 12
    wait for movement
    face user: forward
    </finish action>
     
    #4
    JGreene likes this.

Share This Page