- 760
- Posts
- 15
- Years
- Seen today
Hi all,
I'm making an elevator script. Which is the following:
Which works, but it isn't polished.
When special 0xD8 is called and updates variable 0x403A, the 'now on floor X' displays the wrong floor after reentering the map of the elevator. See Gif below.
Somehow the game updates variable 0x403A and keeps track of what floor you are on, but I don't know how it works and therefore how to change it. Because it still shows the floors of the original ROCKET HIDEOUT after reentering.
Does anybody knows how this works, since I can't seem to find it anywhere:)
I'm making an elevator script. Which is the following:
Spoiler:
#dynamic 0x800000
#org @start
lockall
checkitem 0x164 0x1
compare 0x800D 0x1
if 0x0 goto @nokey
setvar 0x8004 0x2
checkflag 0x2
if 0x0 call @followup1
copyvar 0x8005 0x403A
special 0x132
preparemsg @message2
waitmsg
setvar 0x8004 0x2
special2 LASTRESULT 0x1B8
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @followup2
compare 0x8000 0x1
if 0x1 goto @followup3
compare 0x8000 0x2
if 0x1 goto @followup4
end
#org @nokey
msgbox @message1 0x6
releaseall
end
#org @followup1
special 0xD8
return
#org @followup2
multichoice2 0x0 0x0 0x2A 0x0 0x0
goto @followup5
#org @followup3
multichoice2 0x0 0x0 0x2A 0x1 0x0
goto @followup5
#org @followup4
multichoice2 0x0 0x0 0x2A 0x2 0x0
goto @followup5
#org @followup5
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @followup6
compare 0x8000 0x1
if 0x1 goto @followup7
compare 0x8000 0x2
if 0x1 goto @followup8
compare 0x8000 0x3
if 0x1 goto @followup9
compare 0x8000 0x7F
if 0x1 goto @followup9
end
#org @followup6
setvar 0x8006 0x6
setwarpplace 0x1 0x2A 0xFF 0x17 0x8
compare 0x403A 0x6
if 0x1 goto @followup9
call @followup10
setvar 0x403A 0x6
goto @followup9
#org @followup7
setvar 0x8006 0x4
setwarpplace 0x1 0x2C 0xFF 0x13 0x9
compare 0x403A 0x4
if 0x1 goto @followup9
call @followup10
setvar 0x403A 0x4
goto @followup9
#org @followup8
setvar 0x8006 0x3
setwarpplace 0x1 0x2D 0xFF 0x14 0x5
compare 0x403A 0x3
if 0x1 goto @followup9
call @followup10
setvar 0x403A 0x3
goto @followup9
#org @followup9
special 0x160
releaseall
end
#org @followup10
special 0x160
closeonkeypress
checksound
special 0x111
waitstate
setflag 0x2
return
#org @message1
= It appears to need a key.
#org @message2
= Which floor do you want?
#org @start
lockall
checkitem 0x164 0x1
compare 0x800D 0x1
if 0x0 goto @nokey
setvar 0x8004 0x2
checkflag 0x2
if 0x0 call @followup1
copyvar 0x8005 0x403A
special 0x132
preparemsg @message2
waitmsg
setvar 0x8004 0x2
special2 LASTRESULT 0x1B8
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @followup2
compare 0x8000 0x1
if 0x1 goto @followup3
compare 0x8000 0x2
if 0x1 goto @followup4
end
#org @nokey
msgbox @message1 0x6
releaseall
end
#org @followup1
special 0xD8
return
#org @followup2
multichoice2 0x0 0x0 0x2A 0x0 0x0
goto @followup5
#org @followup3
multichoice2 0x0 0x0 0x2A 0x1 0x0
goto @followup5
#org @followup4
multichoice2 0x0 0x0 0x2A 0x2 0x0
goto @followup5
#org @followup5
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @followup6
compare 0x8000 0x1
if 0x1 goto @followup7
compare 0x8000 0x2
if 0x1 goto @followup8
compare 0x8000 0x3
if 0x1 goto @followup9
compare 0x8000 0x7F
if 0x1 goto @followup9
end
#org @followup6
setvar 0x8006 0x6
setwarpplace 0x1 0x2A 0xFF 0x17 0x8
compare 0x403A 0x6
if 0x1 goto @followup9
call @followup10
setvar 0x403A 0x6
goto @followup9
#org @followup7
setvar 0x8006 0x4
setwarpplace 0x1 0x2C 0xFF 0x13 0x9
compare 0x403A 0x4
if 0x1 goto @followup9
call @followup10
setvar 0x403A 0x4
goto @followup9
#org @followup8
setvar 0x8006 0x3
setwarpplace 0x1 0x2D 0xFF 0x14 0x5
compare 0x403A 0x3
if 0x1 goto @followup9
call @followup10
setvar 0x403A 0x3
goto @followup9
#org @followup9
special 0x160
releaseall
end
#org @followup10
special 0x160
closeonkeypress
checksound
special 0x111
waitstate
setflag 0x2
return
#org @message1
= It appears to need a key.
#org @message2
= Which floor do you want?
Which works, but it isn't polished.
When special 0xD8 is called and updates variable 0x403A, the 'now on floor X' displays the wrong floor after reentering the map of the elevator. See Gif below.
Somehow the game updates variable 0x403A and keeps track of what floor you are on, but I don't know how it works and therefore how to change it. Because it still shows the floors of the original ROCKET HIDEOUT after reentering.
Does anybody knows how this works, since I can't seem to find it anywhere:)