• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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] [pokeemerald] Refresh map without warping

  • 13
    Posts
    1
    Years
    • Seen Mar 29, 2024
    I'm trying to refresh a map during a dialogue, in order to refresh the events of the map with the modifications done to the flags used in "events.inc" during the dialogue. In order to refresh the map, what I'm using right now is

    Code:
    warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5

    This works perfectly, but I wonder if there is a simpler command that does the same thing but without teleporting, and thus without having a black screen when I'm using the command. Something like
    Code:
    refresh MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB
    if that makes any sense. Any idea ?
     
    I'm trying to refresh a map during a dialogue, in order to refresh the events of the map with the modifications done to the flags used in "events.inc" during the dialogue. In order to refresh the map, what I'm using right now is

    Code:
    warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5

    This works perfectly, but I wonder if there is a simpler command that does the same thing but without teleporting, and thus without having a black screen when I'm using the command. Something like
    Code:
    refresh MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB
    if that makes any sense. Any idea ?

    This is a simple fix I think I can help you. First of all whenever you set a flag of the object you want to disappear, I usually do this...

    lock
    faceplayer
    msgbox("ok bye")
    closemessage
    fadescreen FADE_TO_BLACK
    setflag(FLAG OF OBJECT_ID)
    removeobject(OBJECT_ID Number)
    fadescreen FADE_FROM_BLACK
    release
    end

    I hope this helps you out in some way...Let me know
     
    Unfortunately it doesn't do what I want, because there still is a fade. I would like to not have any fade (so no black screen) but still refresh the map the same way as when I do warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5. It is not essential to my rom hack, but it is just a bit ugly to have a fade there. Thanks for your help, though !
     
    Unfortunately it doesn't do what I want, because there still is a fade. I would like to not have any fade (so no black screen) but still refresh the map the same way as when I do warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5. It is not essential to my rom hack, but it is just a bit ugly to have a fade there. Thanks for your help, though !

    Are you setting different map tiles or what? explain what you are trying to do just happen? maybe i can help
     
    I found what was wrong !

    I had a few objects that depended on event flags. The problem is that if an event flag is set for an object, you cannot use the command 'showobject' because the object doesn't exist. I was warping to prevent that, this way I just had to clear the flag of my object, warp, and then my object would disappear.

    What I didn't know is that I can use 'addobject' and 'removeobject' instead of 'showobject' and 'hideobject'. This allows to add an object that was hidden by its event flag.
     
    Back
    Top