• 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] Script Keeps Repeating Itself

73
Posts
8
Years
  • Age 29
  • Seen Apr 18, 2023
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
 
760
Posts
15
Years
  • Seen today
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