View Single Post
  #24434    
Old March 30th, 2013 (10:23 PM).
miksy91's Avatar
miksy91
A GB/C Rom Hacker since 2010
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed
Quote originally posted by robin22gongon:
I compile this script as a script event in A-map
'---------------
#org 0x800F00
checkflag 0x828
if 0x1 goto 0x8800F14
if 0x0 goto 0x8800FF1
release
end

'---------------
#org 0x800F14
nop
release
end


'---------------
#org 0x800FF1
lock
faceplayer
msgbox 0x8800F18 MSG_KEEPOPEN '"Hey whippersnapper!\nCome back her..."
closeonkeypress
release
end


'---------
' Strings
'---------
#org 0x800F18
= Hey whippersnapper!\nCome back here!
Try if that works.
I'd say that when you're not locking the player (making the player unable to move?) during the script, and use "release" anyhow, that will lead to an interrupt that forces the game to freeze.

If this thing is a triggered script like it would make sense for it to be, you should be using "trigger flags" (if such exist in FRLG or RSE) to prevent this script data from loading at all, which you have here done in parts by refering to bit 0x828.
What I meant that you might not want to use a checkbit at all, and by the specifics of the trigger events, define whether a script data is loaded when the player steps on them.

That way, the game won't start executing script data during the gameplay that does especially nothing (even though it doesn't do "anything", it may stop the player on the ground for a while and the player may notice the game "lagging").
But I might be wrong though, triggered scripts may be built in like that in these games, especially since you're not automatically "locked" to the script.
__________________
My Rom Hack




Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations