Condition is Applied when TP = 100

Discussion in 'Javascript/Plugin Support' started by kovak, Dec 3, 2019.

  1. kovak

    kovak Silverguard Veteran

    Messages:
    1,252
    Likes Received:
    1,555
    Location:
    I'm from the Hu3
    First Language:
    PT - EN
    Primarily Uses:
    RMMV
    I've learned that using Custom Passive Condition you can apply a passive state and it will last for a set number of turns.
    My issue is that i need it to check if the units TP has reached 100 to be activated and it must work for Actors and for Enemies as well.

    Could someone help me with it?

    Plugins required:

     
    Last edited: Dec 3, 2019
    #1
  2. TSR

    TSR The Northern Frog Veteran

    Messages:
    44
    Likes Received:
    19
    Location:
    Canada
    First Language:
    French
    Primarily Uses:
    RMMV
    How about this:

    Code:
    <Custom Passive Condition>
      if (user.tp >= 100) {
        condition = true;
      } else {
        condition = false;
      }
    </Custom Passive Condition>
     
    #2
    kovak likes this.
  3. Papillon

    Papillon Veteran Veteran

    Messages:
    41
    Likes Received:
    5
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm a bit rusty but would
    Code:
    if (user.tp >= 100) {
       condition = true;
      } else {
       condition = false;
      }
    
    work?

    Edit: Beaten to it.
     
    Last edited: Dec 3, 2019
    #3
    kovak likes this.
  4. kovak

    kovak Silverguard Veteran

    Messages:
    1,252
    Likes Received:
    1,555
    Location:
    I'm from the Hu3
    First Language:
    PT - EN
    Primarily Uses:
    RMMV
    Thx for both of you.

    I was able to solve the issue making 2 separated states.
     
    Last edited: Dec 4, 2019
    #4

Share This Page