- 6
- Posts
- 12
- Years
- Seen Nov 21, 2015
Yo, I'm having trouble with some flags. The basic set-up is that there's an NPC who won't fight you. However, once talking to a signpost event, talking to this NPC will trigger a battle. I'm doing this via a setflag, which only seems to work on the same map. I'm not sure if I'm doing something wrong, or if flags only apply to the same map. I'm using pksv if that means anything
Code:
#org 0x87408D6
'-----------------------------------
lock
faceplayer
msgbox 0x87408EB ' Howdy, youngster!\pD...
callstd MSG_LOCK ' Built-in lock command
checkflag 0x911
if true jump 0x87406E3 ' Flag is set
release
end
#org 0x87406E3
'-----------------------------------
trainerbattle 0x0 0x14F 0x0 0x8740703 0x874077D
msgbox 0x87407F6 ' FILLER FILLER FILLER...
callstd MSG_LOCK ' Built-in lock command
checkflag 0x912
if false jump 0x87406C9 ' Flag is unset
end
#org 0x87406C9
'-----------------------------------
checkflag 0x912
if true jump 0x87406E1 ' Flag is set
copyvarifnotzero 0x8000 SECRETKEY
copyvarifnotzero 0x8001 0x1
callstd MSG_OBTAIN ' Obtained the XXXXXX!
setflag 0x912
end
#org 0x87406E1
'-----------------------------------
end