Testing for damage dealt

Discussion in 'Javascript/Plugin Support' started by djDarkX, Oct 27, 2015.

  1. djDarkX

    djDarkX Retro & Remastered Music Guru Veteran

    Messages:
    2,699
    Likes Received:
    1,887
    Location:
    Currently unsure...
    First Language:
    Music
    Primarily Uses:
    RMMV
    Okay, so, I'm looking for code that will check to see if damage is dealt to the enemy (not the player).  The reason I need the check is to use an if/else statement for Yanfly's Action Sequences.  Scenario:

    if (damage dealt)

      enemy effect: target, blink

    else

    end

    or

    if (no damage)

    else

      enemy effect: target, blink

    end

    If the enemy doesn't get hit, it doesn't make sense that they'd still blink upon getting a miss or 0 damage.  This is why I'd like a way to test damage during the action sequence.  Hope someone has a solution.  Thanks for any help provided!
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,692
    Likes Received:
    6,596
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    You either need something in every skill to store the numbers, or you need to compare data from now to data from the past.


    I would try to store current values of HP etc for all enemies at the end of each turn (troop event) and then use a condition "value lower".


    However, I don't know if such a check is possible with the existing action sequences - you might still have to wait for an add-on doing that.
     
    #2

Share This Page