Set Map Name as Variable

Discussion in 'RPG Maker MV' started by PhxFire, Sep 6, 2019.

Thread Status:
Not open for further replies.
  1. PhxFire

    PhxFire The Eternal Flame Veteran

    Messages:
    128
    Likes Received:
    65
    First Language:
    English
    Primarily Uses:
    RMMV
    So when I try to use "Control Variables : #0010 Respawn Town = $gameMap.displayName()" I get the starting map's name stored correctly... However when I get to the 2nd town the variable is stored as 0... any ideas why?
    Thanks!
     
    Last edited: Sep 6, 2019
    #1
  2. The Mighty Palm

    The Mighty Palm Resident Palm Tree Restaff

    Messages:
    545
    Likes Received:
    3,603
    Location:
    Unsure. If found, please notify.
    First Language:
    English
    Primarily Uses:
    N/A
    I'm almost certain that a variable has to be numerical.
    If you're trying to have the game store the value of a specific area (which is what I assume, correct me if Im wrong) what you need to do is look at the top left corner of the "EDIT MAP" Window. It shows the ID number of that map. Set your variable to that.
    [​IMG]
    Where it says ID: 001
    OH almost forgot: You can get the ID number of the map directly by doing this command:
    [​IMG]
     
    Last edited: Sep 6, 2019
    #2
  3. Ossra

    Ossra Formerly Exhydra Veteran

    Messages:
    861
    Likes Received:
    627
    First Language:
    English
    Primarily Uses:
    RMMV
    Actually, you can store almost any kind of data in a variable. Text should be more than fine.

    @PhxFire Could you give an example of how you are retrieving the variable? Is the variable set once per map, or just once at the beginning of the game? Is there perhaps a control variable event command that is resetting the variable somewhere?
     
    #3
  4. Jules98

    Jules98 Veteran Veteran

    Messages:
    305
    Likes Received:
    155
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    Just so you know, $gameMap.displayname() is incorrect; it should be $gameMap.displayName()
    Also, are you sure that the map has a display name in the first place?
     
    #4
  5. PhxFire

    PhxFire The Eternal Flame Veteran

    Messages:
    128
    Likes Received:
    65
    First Language:
    English
    Primarily Uses:
    RMMV
    @Jules98 Ya it's correct in game, just made the mistake typing it in the forums

    @Ossra The variable is set to the 1st town at the beginning of the game (which works correctly)... Then overwritten each time they make it to the next town with a 1 time parallel event

    Edit: Yup I found the mistake, the display name must've been deleted at some point :kaosigh: It's always the simple things lol thanks guys!
     
    #5
  6. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,675
    Likes Received:
    4,154
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #6
Thread Status:
Not open for further replies.

Share This Page