• 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.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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!
  • 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.

Little problem with scripting

  • 4
    Posts
    6
    Years
    • Seen Jan 31, 2021
    Soo i started to make a little rom hack, but i cant figure out my problem.

    My script start when i first step on a tile it makes everything it should and after that i can step on the tile again and nothing happens everything perfect until now.
    If i reenter the room and step on the tile again it starts and i have no clue why.
     
    here is the code:

    Code:
    #dynamic 0x800000
    #org @start
    
    lock
    applymovement 0x4 @move2
    msgbox @msg1 0x6
    applymovement 0xff @move1
    waitmovement 0x0
    msgbox @msg2 0x6
    setvar 0x4002 0x1 
    release
    end
    
    #org @move2
    #raw 0x0
    #raw 0xfe
    
    #org @move1
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xfe

    and i tried to add a png off the Advanced map things

    changed it up a little
     

    Attachments

    • [PokeCommunity.com] Little problem with scripting
      1.PNG
      13.8 KB · Views: 6
    Last edited:
    Generally, in FR/LG, it's safer to only use vars from 0x4011. Anything from 0x4000 overlaps different RAM areas like PC Boxes and flags, or they are temporary/disposable variables.

    Also, it's good practice to check the map for default level scripts which could potentially mess up your own level scripts.

    List of identified in-game vars (FR/LG)
    Spoiler:
     
    Back
    Top