YEP Action Sequences - Check for Element Absorption? [Solved]

Discussion in 'Javascript/Plugin Support' started by AdamSakuru, Jan 21, 2019.

Thread Status:
Not open for further replies.
  1. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    First Language:
    English
    Primarily Uses:
    N/A
    EDIT:
    This is solved. The solution for anyone wondering is this:
    PHP:
    if (target.result().hpDamage <= 0)
     [
    things]
    end


    I have my action sequences set up so that targets hit by skills/attacks will go into (and hold on) a shaking damaged pose until they are to act (or until the turn ends). One little problem is that if an enemy absorbs an element type, they won't take damage and will absorb the attack, but will still proceed to act as if they have taken damage by going into the damage pose.

    Would anyone know how to check, inside of an action sequence with an IF eval, if the target of a skill absorbed the action effect/damage?

    I see things like:
    target.result().missed
    target.result().evaded
    target.result().critical

    Is there something similar to any of those?
     
    Last edited: Jan 23, 2019
    #1
  2. zaraku

    zaraku Time Keeper Member

    Messages:
    28
    Likes Received:
    23
    First Language:
    English
    Primarily Uses:
    RMMV
    Try target.result().barrierAffected or target.result()._barrierAffected.
     
    #2
  3. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,036
    Likes Received:
    643
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Haven't tested, but this may be worth a try:
    Code:
    target.result().hpDamage > 0
     
    #3
  4. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    First Language:
    English
    Primarily Uses:
    N/A
    I'm pretty sure this doesn't work, I actually already have it as a condition to check in most of my action sequences (alongside seeing if the attacked missed or anything like that.)

    The reason is that even if an enemy absorbs an attack when it lands, the DAMAGE was still not 0.
     
    #4
  5. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    First Language:
    English
    Primarily Uses:
    N/A
    Does this require YEP's plugin for absorption barriers?
     
    #5
  6. zaraku

    zaraku Time Keeper Member

    Messages:
    28
    Likes Received:
    23
    First Language:
    English
    Primarily Uses:
    RMMV
    Oh, my bad. I don't use element absorption so I thought you were talking about absorption barriers. This is for that plugin only.
     
    #6
  7. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    First Language:
    English
    Primarily Uses:
    N/A
    @caethyril
    So it turns out you were actually right!

    Here's how I had my action sequence set up:
    PHP:
    <target action>
    zoom200%, 13
    CAMERA FOCUS
    targetCENTER13
    wait
    11
    motion spell
    userno weapon
    if (!target.hp && target.isEnemy())
     
    animation 81target
     
    else
     
    animation 81targetmirror
    end
    reset camera
    1500
    zoom
    150%, 800
    wait
    18
    action effect
    if (target.result().missed || target.result().evaded || target.result().hpDamage <= 0)
    else
       if (
    user.isEnemy())
        
    ADD STATE 26target
       end
      shake screen
    6920
       
    if (!target.hp 1)
        
    jump target24%, 15
        float target
    10%, 9
        motion damage
    targetno weapon
        FACE target
    FORWARD
        wait
    3
        FACE target
    FORWARD
        wait
    5
        float target
    0%, 6
        wait
    2
        float target
    0%, 6
        jump target
    20%, 11
        shake screen
    3513
      end
     end
    reset camera
    800
    zoom
    150%, 500
    wait
    7
    float target
    0%, 12
    wait
    8
    float target
    0%, 6
     
    if (user.isEnemy())
     
    move userhome15
     REMOVE STATE 26
    target
     end
    </target action>

    My project has gone through a bunch of changes and one of those changes was editing how the enemy would move in response to damage. In the past I had them move backwards, but this would cancel the damage pose so I had to set it again afterwards. This was the reason it wasn't appearing to work. (Now they just kind of jump in response to damage without moving backwards.)
     
    #7
    caethyril likes this.
  8. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,312
    Likes Received:
    3,957
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #8
Thread Status:
Not open for further replies.

Share This Page