Checking equipment types

Discussion in 'RPG Maker MV' started by boornakaka, Jul 27, 2016.

  1. boornakaka

    boornakaka Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    So I am trying to make a simple conditional statement to check to see if a certain actor is equipped with the Equipment type "Shield". I can't seem to come up with what my script should be. Could I get some direction please?
     
    #1
  2.  Masked 

     Masked  One apple a day keeps the doctor away Veteran

    Messages:
    75
    Likes Received:
    224
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    N/A
    $gameActors.actor(id).equips().some(function(equip) { return !!equip && equip.etypeId == 2; })


    Just change the 'id' on $gameActors.actor(id) to be the id of the actor you are checking.
     
    Last edited by a moderator: Jul 27, 2016
    #2
  3. boornakaka

    boornakaka Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Wow. It works perfectly. Thank you.
     
    #3
  4. MattDrummy

    MattDrummy Villager Member

    Messages:
    8
    Likes Received:
    1
    First Language:
    English
    I have a similar question, how could I modify that statement to check in the damage formula of an attack skill.  I wanted my damage formulas to be modified if the character has an open hand (visa vi DnD 3.5).

     
    #4

Share This Page