Quote:
Originally Posted by mcferaligatr
Here I'll make 2 scripts, one outside the lab (person event) and one in the lab (level script).
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @t1 0x6
hidesprite 0x1
setflag 0x210
setvar 0x4011 0x1 '---------(here I set a var 0x4011 to 0x1 so that the level script knows we talked to prof outside the lab)
release
end
#org @t1
= Hi player, meet me at the lab.
'------------------------ I just used 0x1 and 0x210 as examples, you put your own event number and flag there.
Below is the level script of the lab:
#dynamic 0x800000
#org @start
hidesprite 0x1
setflag 0x210
compare 0x4011 0x1
if 0x1 call @showprof
end
#org @showprof
showsprite 0x1
clearflag 0x210
return
'--------------------------
This way, we used the same flag for 2 prof events. Do note however, that when you enter the lab after talking to the prof, and entering the lab, the flag outside the lab will be cleared as well. To prevent this from happening, we can use a level script outside the lab too:
#dynamix 0x800000
#org @start
showsprite 0x1
clearflag 0x210
compare 0x4011 0x1
if 0x1 call @hideprof
end
#org @hideprof
hidesprite 0x1
setflag 0x210
return
'---------------------------
Hopefully this clears things up a bit, you can easily track events with variables, as one variable can store a lot of values (not sure how much), or you can simply use a different flag that will be cleared when the player enters the lab (provided they talked to prof. earlier).
|
Thanks, I tried studying flags and vars, but seems a bit hard, got to study more
__________________
SIGNATURES:
1.😄 Thank You
2. Recruiting for Let's go Togepi / Pichu (ROM hack of firered)

My dear 'ROCCO'