• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

[Script] Is there a way for XSE to tell what map the player is on?

Title. I am trying to make a script that changes based on where the player is at, is there an XSE command that can tell which map the player is on?

I think click F1 key in Xse and see info on commands , maybe there?
 
Title. I am trying to make a script that changes based on where the player is at, is there an XSE command that can tell which map the player is on?
You can find a complete list of scripting commands here (and a complete list of specials here). As far as I know, none of them tell you what map you're on.

It would be trivial to add a custom command or special that does that, especially if you use the decomp. But you could also design your script in a way that doesn't require knowing the map. For example you could place scripts like this in your maps:
Code:
setvar <some variable>, <some map specific value>
goto <your script>
You can then check the value of the variable in your script to figure out which map the script was called from.
 
Last edited:
Back
Top