• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Help with the XSE showsprite command?

Thoriére

[i]If everything's a dream, don't wake me.[/i]
  • 121
    Posts
    10
    Years
    Sorry for posting so much the past couple days, I haven't hacked in a while because life has been way too hectic... settled down now that I'm living in the middle of nowhere though.

    Anyway, I've been crawling over multiple sites trying to figure out how to make hidden trainer sprites from one map (i.e. the first floor of the player's house) show up when the player steps on a tile on another map (i.e. the upstairs floor of the player's house). I know that XSE has a showsprite command, but I'm kind of blanking on how to use it properly. I'm pretty sure it involves something with AdvanceMap IDs but it's not really getting through my head and I'd like someone to explain it to me in a way I can better understand. Since the event occurs after the player obtains their starter, I'm basing it off of the flag that's set in BPRE when you obtain your first PKMN and are able to access that menu.

    Unfinished script included below. The section I need help with is underneath "#org @showsprites", but if there are any other bugs you can see, please let me know.

    Spoiler:

    If possible, I'd like help understanding what the process is rather than just having somebody write the script for me. Thanks to anyone who responds.
     
    Last edited:
    First, I recommend viewing this tutorial: https://www.pokecommunity.com/threads/369646
    The whole serie is great by the way.

    Second, some explaining myself. The showsprite command only works for the map you're currently in and only of you're close enough to the NPC.

    Most of the showing and dissappearing of overworld sprites is done by flags. You should give the overworld sprite that you want to show in one instance and dissappear in the other instance a flag. The flag you want to connect with the overworld is set in the Person ID in AdvanceMap.

    Coherent with that you should write a script in which you can use the setflag and claerflag command.
    When you set a certain flag, the overworld sprites connected to that flag will dissappear the next time you enter the map. When you clear a certain flag, the overworld sprites connected to that flag will appear.

    Hope this helps;)
     
    Back
    Top