• 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.

[Script] [pokeemerald] Refresh map without warping

  • 13
    Posts
    346
    Days
    • 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 ?
     
  • 124
    Posts
    8
    Years
    • Seen Apr 5, 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 ?

    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
     
  • 13
    Posts
    346
    Days
    • Seen Mar 29, 2024
    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 !
     
  • 124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    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
     
  • 13
    Posts
    346
    Days
    • Seen Mar 29, 2024
    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