YEP Action Sequence + Battle Event by HP% Question

Discussion in 'Javascript/Plugin Support' started by AdamSakuru, Oct 20, 2017.

  1. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    First Language:
    English
    Primarily Uses:
    N/A
    I have a question regarding action sequences in conjunction with Battle Events triggered by enemy HP%

    I made a special thunder dual skill that hits 3 random enemies. The player can use it during the first boss fight (who's weak to thunder). The thing is, if the boss dies while the first or second hit lands, the rest of the hits will occur after the battle event that's triggered right when his HP hits 0. This is because the event starts instantly (during the action sequence) rather than letting the action sequence finish first.

    Is there a way for me to have the battle event start AFTER the action/sequence is finished, even if the boss dies midway through the action sequence?

    Here's what the action sequence looks like:
    Code:
    <Setup Action>
    reset zoom: 10
    reset camera: 8
    wait: 10
    motion thrust: character 1, no weapon
    MOVE character 1: FORWARD, 35, 15
    jump character 1: 10%, 14
    jump character 3: 30%, 18
    MOVE character 3: character 1, FRONT BASE, 20, offset y -5
    motion thrust: character 3, no weapon
    wait: 20
    battleback 3 add: battlebacks1, DIMMER_CC
    motion standby: character 1
    wait: 4
    motion standby: character 3
    wait: 2
    FLASH SCREEN: WHITE, 30
    FACE character 6: BACKWARD
    common event: 28
    motion victory: character 1, no weapon
    motion victory: character 3, no weapon
    camera focus: user, center, 15
    zoom: 200%, 15
    animation 36: user, mirror
    wait: 50
    zoom: 150%, 500
    wait: 10
    MOTION SPELL: character 1, no weapon
    MOTION SPELL: character 3, no weapon
    BATTLEBACK 3 CHANGE TO: battlebacks1, SPEEDLINES_4
    battleback 3 scroll speed x: -100
    wait: 20
    </setup action>
    
    <target action>
    MOTION SPELL: character 1, no weapon
    MOTION SPELL: character 3, no weapon
    CAMERA FOCUS: target, center, 8
    zoom: 200%, 15
    wait: 4
    action animation
    wait: 5
    MOTION SPELL: character 1, no weapon
    MOTION SPELL: character 3, no weapon
    action effect
      if (target.result().missed || target.result().evaded)
      else
      reset camera: 1500
      zoom: 150%, 800
      shake screen: 6, 9, 20
      jump target: 24%, 17
      MOVE target: BACKWARD, 60, 17
      FACE target: FORWARD
      motion damage: target, no weapon
      wait: 3
      motion damage: target, no weapon
      FACE target: FORWARD
      MOTION SPELL: character 1, no weapon
      MOTION SPELL: character 3, no weapon
      wait: 11
      shake screen: 3, 5, 13
      end
    reset camera: 800
    zoom: 150%, 500
    wait: 8
    move target: home, 10
    </target action>
    
    <finish action>
    move character 1: home, 15
    motion thrust: character 1, no weapon
    move character 3: home, 15
    motion thrust: character 3, no weapon
    battleback 3 remove
    wait for movement
    motion standby: character 3
    motion standby: character 1
    FACE character 1: FORWARD
    FACE character 3: FORWARD
    opacity not focus: 255, 10
    wait for opacity
    remove state 7: user
    </finish action>
    
    <Post-Damage Eval>
    var bonusStateRate = 0.25 + (user.luk / 300);
    if ((Math.random() < bonusStateRate && target.elementRate(5) > 1) || (Math.random() < bonusStateRate && target.result().critical)) user.addState(7);
    if (target.elementRate(5) > 1) target.startAnimation(4);
    
    var paralyzeStateRate = 0.20 - (target.luk / 300);
    if (Math.random() < paralyzeStateRate) target.addState(21);
    
    var punishStateRate = 0.25 + (target.luk / 300);
    if ((Math.random() < punishStateRate && target.elementRate(5) < 1)) target.addState(23);
    </Post-Damage Eval>
     
    #1

Share This Page