• 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!
  • Dawn, Gloria, Juliana, or Summer - 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] Script Keeps Repeating Itself

  • 73
    Posts
    9
    Years
    • Seen Jul 18, 2024
    So I set a level script into my Firered Hack and it plays out properly without any problems but if I walk back over the spot, it plays the text again.

    Here is the compiled script, I'm not sure at all what's wrong here

    '---------------
    #org 0x800376
    msgbox 0x8800396 MSG_NORMAL '"The terraform experiment with\nReg..."
    applymovement 0x5 0x88003E8
    waitmovement 0x5
    hidesprite 0x5
    setvar 0x4012 0x1
    setflag 0x1206
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x800396
    = The terraform experiment with\nRegirock was a success. Proceed to\lthe next step.


    '-----------
    ' Movements
    '-----------
    #org 0x8003E8
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
     
    So I set a level script into my Firered Hack and it plays out properly without any problems but if I walk back over the spot, it plays the text again.

    Here is the compiled script, I'm not sure at all what's wrong here

    '---------------
    #org 0x800376
    msgbox 0x8800396 MSG_NORMAL '"The terraform experiment with\nReg..."
    applymovement 0x5 0x88003E8
    waitmovement 0x5
    hidesprite 0x5
    setvar 0x4012 0x1
    setflag 0x1206
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x800396
    = The terraform experiment with\nRegirock was a success. Proceed to\lthe next step.


    '-----------
    ' Movements
    '-----------
    #org 0x8003E8
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements

    First, you talk about a level script and then about ''walking back over the spot'', which implies you're using a script tile and not a level script. Which one of the two are you using?

    To make sure the script doesn't repeat you need to set the variable that triggers the script event to a different value than the one that triggers the script. Are you using var 0x4012 for the script event to trigger? And if so, is it triggered when value 0x1 is stored in that variable?
     
    Back
    Top