Name "Check"

Discussion in 'RPG Maker MV' started by Cassteal, Jan 27, 2016.

  1. Cassteal

    Cassteal Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Hello! I'm very new to the RPGMAKERMV engine, and very new to this forum as well. I have one huge question that I've put an hour or two of research into and came up with nothing so far, so I've decided to ask it now.


    In the game Undertale,  if you input certain names, you will receive a special message. EX:(Inputting "Flowey", a main character from the game, will send you the message "I already chose that name!" and will force you to choose a new name.


    How do you "check" for a certain name being chosen after using Name Input Processing?


    I'd like to know how to do this in this engine, and assuming it is probably going to involve javascript, I put it under this section.


    Thanks in advance for responding.
     
    #1
  2. Makio-Kuta

    Makio-Kuta Canadian Goose Veteran

    Messages:
    1,935
    Likes Received:
    2,396
    Location:
    Canada
    First Language:
    English
    You'll want to use a conditional branch.


    Page 2 of conditional branch options has the option to check if an Actor's name is something.


    [​IMG]


    So this set up here checks to see if Actor #005's name is VIOLET. from there you can have whatever you want to happen within the branch for that name. Careful because it -IS- case sensitive.
     
    #2
    NeirdaZT and Cassteal like this.
  3. Nocturnic

    Nocturnic Designer and Story Writer Veteran

    Messages:
    39
    Likes Received:
    17
    Location:
    United States
    First Language:
    English
    Aww yiss, this'll be great for multiple paths and what not too.
     
    #3
  4. Cassteal

    Cassteal Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
     
    #4
  5. Makio-Kuta

    Makio-Kuta Canadian Goose Veteran

    Messages:
    1,935
    Likes Received:
    2,396
    Location:
    Canada
    First Language:
    English
    btw, if you want to get around the case sensitive thing here's what we used in I Object!?'s password door.


    First, let the player name the Actor you want (in this example it's Actor 4).


    Then, on page three of event commands you have something called "Script" towards the end of the list open it and use this (Replacing 5 with a new actor you don't use anywhere else, and 4 with the actor the player is naming):


    $gameActors.actor(5).setName($gameActors.actor(4).name().toUpperCase());


    This tells the program to change Actor 5's name to the same name as Actor 4 and then put it into all caps. From there, when you use your conditional branch, check for the names you want against Actor 5's name and type them in all caps. This way, no matter how the player decides to write the name, it will check an all caps version against an all cap version.


    Actor 4 will remain the way the player typed it, even if they typed it as "RaLpH"


    This can also be useful for making things use passwords.
     
    #5
    NeirdaZT and Cassteal like this.
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,712
    Likes Received:
    11,419
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Moving to MV Support


    The JavaScript forum is for when you need a whole plugin.  What you're asking about is as simple as using the Script event command or the Script part of the conditional branch.
     
    #6

Share This Page