1. Dismiss Notice
  2. Within our Resources section we have over 150 Audio files, with room to grow. You may find exactly what you have been looking for. Just CLICK HERE to start your listening adventure.
    Dismiss Notice
  3. Why would you want to upload your resources directly to RMMV.co? It makes it easier for other members to download them. Click HERE for more information.
    Dismiss Notice
  4. Click HERE to see our four new featured resources by TheUnproPro, Starbird, iblamevictoria, and VGM MarkH.
    Dismiss Notice
  5. Here are the The Resource Rules.
    Dismiss Notice
  6. Please read these RULES before posting.
    Dismiss Notice

Notetag Conditional Evaluations

Discussion in 'Javascript Support' started by GobbleGobble, Nov 10, 2017.

  1. Hello.

    What I'm looking to do is conditional evaluations in notetags that cannot be solved through the conditions feature of RMV...

    In battle...
    If [actor 1] targets [enemy 1] then...

    Examples:
    - Either triggers a common event
    - Or toggles a switch on/off or increases a variable...
    - Or triggers dialogue, effect, or some kind of buff on Actor 1 (or whomever else I want to target)...

    ...I have this one example to go by from Yanfly's page about evalulations with Battle A.I....

    Example: Eval user.name() === ‘Bat A’: Skill 10, Highest HP%

    However, things like user.name() and other such inputs are foreign to me. Is there an index for things like this?

    Can someone provide an example of conditional if, then, else inside of notetags written as a single-line script?

    And is there an index I can refer to?
     
  2. I tried this code in an enemy note tag so that when you target this enemy a message appears... but it doesn't work...

    First I tried this... which did not work...
    <Custom Select Condition>
    if (target.name() === ‘Bat’) {
    condition = true;
    $gameMessage.add(“Bat = True”);
    }
    </Custom Select Condition>

    Then I tried this... which did not work either...

    <Custom Select Condition>
    if (target.name() === ‘Bat’) {
    condition = true;
    $gameMessage.setFaceImage('Actor1',0)
    $gameMessage.setBackground(1)
    $gameMessage.setPositionType(1)
    $gameMessage.add(“Bat = True”);
    }
    </Custom Select Condition>


    This is Yanfly's code for Selection Control...
    <Custom Select Condition>
    if (target.name() === ‘Harold’) {
    condition = true;
    } else {
    condition = false;
    }
    </Custom Select Condition>


    What am I missing here?
     

Share This Page

Loading...