Indigo_Thief
Silver Candidate
- 11
- Posts
- 4
- Years
- Ecruteak City, Johto
- Seen Jul 20, 2022
Hi everybody!
I'm currently working on my own little Emerald Hack and I ran into a problem with my first attempt at a scripted event.
The event is supposed to trigger when you take your first step off the dock in Dewford Town and has Noland walk up to the player, talk and walk offscreen.
When stepping onto the trigger it works like a charm, but when I save the game, restart and walk over the script again part of the script triggers again (essentially the message boxes, because I suppose the hidesprite flag did apply correctly).
My best guess is that the var I set is used somewhere else. Sadly I can't find a list on which vars are safe.
Every Input is appreciated!
'---------------
#org 0x86A139
lock
applymovement 0x6 0x886A188
waitmovement 0x0
msgbox 0x89C0FBA MSG_NORMAL '"[darkgrey_em]Well, hello young TRA..."
applymovement 0x6 0x89C12C5
waitmovement 0x0
msgbox 0x89C114B MSG_NORMAL '"[darkgrey_em]...\p[red_em]SHE[dark..."
applymovement 0x6 0x89C12CA
waitmovement 0x0
msgbox 0x89C1250 MSG_NORMAL '"[darkgrey_em]Well, thank you very ..."
applymovement 0x6 0x89C12CF
waitmovement 0x0
hidesprite 0x6
setflag 0x22
setvar 0x8003 0x1
release
end
'---------
' Strings
'---------
#org 0x9C0FBA
= [darkgrey_em]Well, hello young TRAINER!\nDid you happen to see a dark haired\l[red_em]LADY [darkgrey_em]around here?\pYou see, we-\p...\pOh, pardon me. I think I forgot to\nintroduce myself.\pMy name is NOLAND and\nI'm the head of the Battle Factory\ldown at the Battle Frontier.\pMy colleagues and I heard\nrumours about certain legendary\lPOKèMON coming to roost here\lon mainland HOENN.\pBut somehow my [red_em]PARTNER[darkgrey_em] and I\nwere split.
#org 0x9C114B
= [darkgrey_em]...\p[red_em]SHE[darkgrey_em] might have headed to\nSLATEPORT if I think about it...
#org 0x9C1250
= [darkgrey_em]Well, thank you very much\nyoung TRAINER. I'll be off then.\pMaybe we will see each other\nsometime in the future.
'-----------
' Movements
'-----------
#org 0x86A188
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0x14 'Delay5
#raw 0x2 'Face Left
#raw 0x14 'Delay5
#raw 0x3 'Face Right
#raw 0x14 'Delay5
#raw 0x56 'Exclamation Mark (!)
#raw 0x14 'Delay5
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xFE 'End of Movements
#org 0x9C12C5
#raw 0x14 'Delay5
#raw 0x2 'Face Left
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x9C12CA
#raw 0x14 'Delay5
#raw 0x3 'Face Right
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x9C12CF
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xFE 'End of Movements
I'm currently working on my own little Emerald Hack and I ran into a problem with my first attempt at a scripted event.
The event is supposed to trigger when you take your first step off the dock in Dewford Town and has Noland walk up to the player, talk and walk offscreen.
When stepping onto the trigger it works like a charm, but when I save the game, restart and walk over the script again part of the script triggers again (essentially the message boxes, because I suppose the hidesprite flag did apply correctly).
My best guess is that the var I set is used somewhere else. Sadly I can't find a list on which vars are safe.
Every Input is appreciated!
SCRIPT from XSE
'---------------
#org 0x86A139
lock
applymovement 0x6 0x886A188
waitmovement 0x0
msgbox 0x89C0FBA MSG_NORMAL '"[darkgrey_em]Well, hello young TRA..."
applymovement 0x6 0x89C12C5
waitmovement 0x0
msgbox 0x89C114B MSG_NORMAL '"[darkgrey_em]...\p[red_em]SHE[dark..."
applymovement 0x6 0x89C12CA
waitmovement 0x0
msgbox 0x89C1250 MSG_NORMAL '"[darkgrey_em]Well, thank you very ..."
applymovement 0x6 0x89C12CF
waitmovement 0x0
hidesprite 0x6
setflag 0x22
setvar 0x8003 0x1
release
end
'---------
' Strings
'---------
#org 0x9C0FBA
= [darkgrey_em]Well, hello young TRAINER!\nDid you happen to see a dark haired\l[red_em]LADY [darkgrey_em]around here?\pYou see, we-\p...\pOh, pardon me. I think I forgot to\nintroduce myself.\pMy name is NOLAND and\nI'm the head of the Battle Factory\ldown at the Battle Frontier.\pMy colleagues and I heard\nrumours about certain legendary\lPOKèMON coming to roost here\lon mainland HOENN.\pBut somehow my [red_em]PARTNER[darkgrey_em] and I\nwere split.
#org 0x9C114B
= [darkgrey_em]...\p[red_em]SHE[darkgrey_em] might have headed to\nSLATEPORT if I think about it...
#org 0x9C1250
= [darkgrey_em]Well, thank you very much\nyoung TRAINER. I'll be off then.\pMaybe we will see each other\nsometime in the future.
'-----------
' Movements
'-----------
#org 0x86A188
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0x14 'Delay5
#raw 0x2 'Face Left
#raw 0x14 'Delay5
#raw 0x3 'Face Right
#raw 0x14 'Delay5
#raw 0x56 'Exclamation Mark (!)
#raw 0x14 'Delay5
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xFE 'End of Movements
#org 0x9C12C5
#raw 0x14 'Delay5
#raw 0x2 'Face Left
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x9C12CA
#raw 0x14 'Delay5
#raw 0x3 'Face Right
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x9C12CF
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0xFE 'End of Movements