Mirror Motions in Yanfly Action Sequences

Discussion in 'Javascript/Plugin Support' started by jayholden, Apr 23, 2019.

  1. jayholden

    jayholden Veteran Veteran

    Messages:
    35
    Likes Received:
    3
    First Language:
    English
    Hello, my battlers are on the opposite sides of the screen from standard (the player-characters face right while the enemies face left). Since the enemies are static I reversed them manually by flipping the images in an image program.

    While idling, the player-character sprites are mirrored using DreamX's plugin found here ( https://forums.rpgmakerweb.com/index.php?threads/mirror-battlers.60899/ ). To maintain the correct facing during action sequences I use "face user: away from target" during each animation step.

    Unfortunately user facing does not seem to affect motions, such as "motion attack: user". So what I wind up with is the below - the weapon is on the left, the wrong side, when the user attacks. How can I make that not happen? Thanks!

    [​IMG]

    Below is a sample skill in case it's userful:

    <target action>
    change switch ActionSequence: on
    move user: target, back base, 15
    jump user: 45, 15
    face user: away from target
    wait for movement
    wait: 10

    move user: target, back head, 10
    face user: away from target
    motion evade: user
    Eval: user.battler().setMaxFrame(1)
    wait: 5
    motion attack: user
    Eval: user.battler().setMaxFrame(1)
    move user: target, back center, 5
    face user: away from target
    add state 26: all actors
    wait: 15
    enemy effect: target, whiten
    remove state 26: all actors
    Eval: user.battler().removeMaxFrame()
    move user: target, back base, 5
    face user: away from target
    action effect
    shake screen: 2, 2, 15
    move target: forward, 20, 15
    wait for movement
    wait: 20
    move target: backward, 20, 12
    jump target: 4, 12
    face target: away from user

    move user: home, 15
    jump user: 45, 15
    face user: away from target
    motion evade: user
    wait for movement
    motion walk: user
    change switch ActionSequence: off
    </target action>
     
    #1
    jjleroy and ninestigmas like this.
  2. jjleroy

    jjleroy I love bananas Veteran

    Messages:
    184
    Likes Received:
    33
    Location:
    Austria
    First Language:
    German, English
    Primarily Uses:
    RMMV
    DUDE!!!!!!

    I SOLVED IT!!!!!!!!!

    All you have to do is go to Yanfly Battle Engine Core

    Then change THIS:

    Game_Battler.prototype.spriteFaceBackward = function() {
    this.setMirror(true);
    };

    to THAT:

    Game_Battler.prototype.spriteFaceBackward = function() {
    this.setMirror(false);
    };

    THAT WAS ALL!!!!!!!!!!!!!!!!!!!!!
     
    Last edited: Sep 14, 2019
    #2

Share This Page