• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Map Names in Scripts

12
Posts
6
Years
  • Age 30
  • Seen Mar 28, 2022
Hi, tried to have a look myself but can't seem to find/make anything that does the job I am after. I am trying to set a variable to the name of a map that the player is not currently on. I would prefer not to hard code this and use the actual map name as the variable.

I understand $game_map.name returns the name of the map I am currently standing on, what I would like to do is lookup the name of a given map ID.

Thanks

Kieran
 
1,680
Posts
8
Years
  • Age 24
  • Seen today
Load screen uses
Code:
mapname = pbGetMapNameFromId(@mapid)
        mapname.gsub!(/\\PN/,@trainer.name)
Seems like this is what you want, though slight modifications are required, as I just pulled this directly from the load screen stuff.
 
Back
Top