List of gamestates

From Viki
Jump to navigation Jump to search

This page documents every main game "gamestate" in VVVVVV.

List of gamestates
ID Next state State delay Description Notes
0 Do nothing. If there's a script running, and it's paused, and there's no advanceable textbox, then unpause the script. If there's no script, give the player control, and turn off completestop.
1 0 For initialization
2 3 Textbox: To do: write quick
intro story!
Unused, not localized or autowrapped
4 0 60 frame background text: Press arrow keys or WASD to move 2 space padding on each side, wrapping pads to 4 spaces
5 6 Run returntohub, remove trigger 5
7 0 Remove textboxes, unlock input
8 0 If flag 13 is off, 60 frame background text: Press ENTER to view map and quicksave. Turn flag 13 on 2 space padding on each side
9 0 If you have cheat settings in the main game, return to the secret lab, run disableaccessibility. If not, remove trigger 9, start the super gravitron
10 0 Remove trigger 10, start the gravitron
11 0 Remove textboxes fast, 180 frame background text: When you're NOT standing on the [floorceiling], [crewmate] will stop and wait for you. [floorceiling] is "floor" or "ceiling" depending on flip mode. [crewmate] depends on lastsaved: 2 = Vitellary, 3 = Vermilion, 4 = Verdigris, 5 = Victoria, default = your companion. 2 space padding on each side, pads to 36*8, wrapping pads to 2 spaces
12 0 If flag 61 is off, 120 frame background text: You can't continue to the next room until [he is/she is/they are] safely across. Turn flag 16 on Vitellary/Vermilion/Verdigris = he is, Victoria = she is, anyone else = they are. 2 space padding on each side, pads to 36*8, wrapping pads to 2 spaces
13 0 Remove textboxes instantly, remove trigger 13
14 0 Remove textboxes fast, 180 frame background text: When you're standing on the [floorceiling], [crewmate] will try to walk to you. [floorceiling] is "floor" or "ceiling" depending on flip mode. [crewmate] depends on lastsaved: 2 = Vitellary, 3 = Vermilion, 4 = Verdigris, 5 = Victoria, default = your companion. 2 space padding on each side, pads to 36*8, wrapping pads to 2 spaces
15 0 If the player is sad, make them happy Used for the naughty corner. Resets their tile to 0
16 0 If the player is happy, make them sad and play the cry sound Used for the naughty corner. Sets their tile to 144, plays sound 2
17 0 Remove trigger 17, 100 frame background text: If you prefer, you can press UP or DOWN instead of ACTION to flip. 1 space padding on each side, wrapping pads to 2 spaces
20 0 Remove trigger 20. If flag 1 is off, remove textboxes, turn flag 1 on
21 0 Remove trigger 21. If flag 2 is off, remove textboxes, turn flag 2 on
22 0 Remove trigger 22. If flag 3 is off, remove textboxes fast. 60 frame background text: Press ACTION to flip. Turn flag 3 on 2 space padding on each side, wrapping pads to 4 spaces
30 0 Remove trigger 30. If flag 4 is off, remove textboxes, run firststeps, turn flag 4 on
31 0 0 Remove trigger 31. If flag 6 is off, remove textboxes, run communicationstation, turn flags 5 and 6 on
32 0 Remove trigger 32. If flag 7 is off, remove textboxes, run teleporterback, turn flag 7 on
33 0 Remove trigger 33. If flag 9 is off, remove textboxes, run rescueblue, turn flag 9 on
34 0 Remove trigger 34. If flag 10 is off, remove textboxes, run rescueyellow, turn flag 10 on
35 0 Remove trigger 35. If flag 11 is off, remove textboxes, run rescuegreen, turn flag 11 on
36 0 Remove trigger 36. If flag 8 is off, remove textboxes, run rescuered, turn flag 8 on
37 0 Remove trigger 37. If your companion is Vitellary, run int2_yellow
38 0 Remove trigger 38. If your companion is Vermilion, run int2_red
39 0 Remove trigger 39. If your companion is Verdigris, run int2_green
40 0 Remove trigger 40. If your companion is Victoria, run int2_blue
41 0 Remove trigger 41. If flag 60 is off, run int1[color]_2, turn flag 60 on [color] is "yellow", "red", "green", or "blue" depending on lastsaved
42 0 Remove trigger 42. If flag 62 is off, run int1[color]_3, turn flag 62 on [color] is "yellow", "red", "green", or "blue" depending on lastsaved
43 0 Remove trigger 43. If flag 63 is off, run int1[color]_4, turn flag 63 on [color] is "yellow", "red", "green", or "blue" depending on lastsaved
44 0 Remove trigger 44. If flag 64 is off, run int1[color]_5, turn flag 64 on [color] is "yellow", "red", "green", or "blue" depending on lastsaved
45 0 Remove trigger 45. If flag 65 is off, run int1[color]_6, turn flag 65 on [color] is "yellow", "red", "green", or "blue" depending on lastsaved
46 0 Remove trigger 46. If flag 66 is off, run int1[color]_7, turn flag 66 on [color] is "yellow", "red", "green", or "blue" depending on lastsaved
47 0 Remove trigger 47. If flag 69 is off, run trenchwarfare, turn flag 69 on
48 0 Remove trigger 48. If flag 70 is off, run trinketcollector, turn flag 70 on
49 0 Remove trigger 49. If flag 71 is off, play the final level remix, turn flag 71 on Plays music ID 15
50 51 100 Play sound 15, 60 frame background text: Help! Can anyone hear this message? Textboxes are right aligned to a hardcoded position of 224
51 52 100 Play sound 15, 60 frame background text: Verdigris? Are you out there? Are you ok? Textboxes are right aligned to a hardcoded position of 224
52 53 100 Play sound 15, 60 frame background text: Please help us! We've crashed and need assistance! Textboxes are right aligned to a hardcoded position of 224
53 54 100 Play sound 15, 60 frame background text: Hello? Anyone out there? Textboxes are right aligned to a hardcoded position of 224
54 55 100 Play sound 15, 60 frame background text: This is Doctor Violet from the D.S.S. Souleye! Please respond! Textboxes are right aligned to a hardcoded position of 224
55 56 100 Play sound 15, 60 frame background text: Please... Anyone... Textboxes are right aligned to a hardcoded position of 224
56 50 100 Play sound 15, 60 frame background text: Please be alright, everyone... Textboxes are right aligned to a hardcoded position of 224
80 81/Nothing If the screen is fully black from a fade, go to state 81
81 0 Quit to menu, play music 6
82 83/0 Remove trigger 82. If you're in translator exploring mode, enable teleporters, and go to state 0. If you're in a time trial, save the time trial results, unlock achievements if applicable, save settings, start a fadeout, and go to state 83 Achievements aren't unlocked if you're in a custom level
83 83/Nothing Decrease the frame counter by 1. If the screen is fully black from a fade, go to the next state
84 0 Quit to menu, create the time trial complete menu, and go to state 0
85 86 Remove trigger 85. Play music 2, turn flag 72 on, Shake the screen for 10 frames, make the screen white for 5 frames, Enable finalstretch, remove the warp background and start the room color changing effect
90 0 Remove trigger 90. Run startexpolevel_station1 Unused, as this was intended for the eurogamer expo. Funnily enough, the comment "remove later" is before these states
91 0 Remove trigger 91. Run startexpolevel_lab Unused, as this was intended for the eurogamer expo.
92 0 Remove trigger 92. Run startexpolevel_warp Unused, as this was intended for the eurogamer expo.
93 0 Remove trigger 93. Run startexpolevel_tower Unused, as this was intended for the eurogamer expo.
94 0 Remove trigger 94. Run startexpolevel_station2 Unused, as this was intended for the eurogamer expo.
95 0 Remove trigger 95. Run startexpolevel_final Unused, as this was intended for the eurogamer expo.
96 97/Nothing Remove trigger 96. If the screen is fully black from a fade, go to state 97
97 0 Return to the lab, and go to state 0
100 101/Nothing Remove trigger 100. If flag 4 is off, turn flag 4 on, and go to state 101 Unused
101 102/Nothing If the player is on the ground, go to state 102. If the player is on a roof, and the player is flipped, unflip the player, play the flip sound. Unused. The flip sound is 1. Since continuing to state 102 only happens if the player is on the ground, the gamestate will stay 101 until the player is on the ground again
102 103 Set the companion to 6, make them happy, set their state to 1, textbox: Captain! I've been so worried!, go to state 103, play sound 12 Unused
104 105 Textbox: I'm glad you're ok!, go to state 105, play sound 11 Unused
106 107 Textbox: I've been trying to find a
way out, but I keep going
around in circles...
, go to state 106, play sound 2, change the companion's tile to 54, set their state to 0
Unused
108 109 Textbox: Don't worry! I have a
teleporter key!
, go to state 109, play sound 11
Unused
110 111 Textbox: Follow me!, go to state 111, play sound 11 Unused
112 0 Remove textboxes Unused
115 116 Locks player input Unused. Comment is "Test script for space station, totally delete me!"
116 117 Textbox: Sorry Eurogamers! Teleporting around
the map doesn't work in this version!
, go to state 118, play sound 11
Unused
118 0 Remove textboxes, set hascontrol to true, set advancetext to false, go to state 0 Unused
120 121/Nothing Remove trigger 120. If flag 5 is off, turn flag 5 on, and go to state 121 Unused. Comment is "Meeting crewmate in the space station"
121 122/Nothing If the player is on the ceiling, go to state 122. If the player is on the ground, and the player is unflipped, flip the player, play the unflip sound. Unused. The flip sound is 1. Since continuing to state 122 only happens if the player is on the ceiling, the gamestate will stay 121 until the player is on the ceiling again
122 123 Set the companion to 7, make them happy, set their state to 1, textbox: Captain! You're ok!, go to state 123, play sound 14 Unused
124 125 Textbox: I've found a teleporter, but
I can't get it to go anywhere...
, go to state 125, play sound 2
Unused
126 127 Textbox: I can help with that!, go to state 127, play sound 11 Unused
128 129 Textbox: I have the teleporter
codex for our ship!
, go to state 129, play sound 11
Unused
130 131 Textbox: Yey! Let's go home!, go to state 131, play sound 14, set the companion's tile to 6, set their state to 1 Unused
132 0 Remove textboxes, set hascontrol to true, set advancetext to false, go to state 0 Unused
200 0 Turn flag 72 on, Play sound 9, shake the screen for 10 frames, make the screen white for 5 frames, Enable finalstretch, remove the warp background and start the room color changing effect Increments the state (to 201), but then sets it back to 0...
300 - 336 0 Remove trigger with the gamestate's ID. Run the gamestate - 300th script in the room. These are used for custom level script boxes
1000 1001 15 Show cutscene bars, lock player input, set completestop Used when collecting a trinket
1001 1002 15 Textbox: Congratulations!

You have found a shiny trinket!
, textbox: [trinkets] out of [max trinkets], go to state 1002, play sound 11
Used when collecting a trinket
1002 1003/Nothing 15 If advancetext is false, go to state 1003. Used when collecting a trinket. Comment is "Prevent softlocks if we somehow don't have advancetext"
1003 0 Remove textboxes, unlock input, set completestop to false, go to state 0, fade music in, hide cutscene bars Used when collecting a trinket
1010 1011 15 Show cutscene bars, lock player input, set completestop Used when collecting a crewmate
1011 1012 15 Textbox: Congratulations!

You have found a lost crewmate!
, textbox: All crewmates rescued! OR [remaining_crew] remain[s], go to state 1012, play sound 11
Used when collecting a crewmate. This gamestate only exists if the build of VVVVVV has custom level support
1012 1013/Nothing 15 If advancetext is false, go to state 1013. Used when collecting a crewmate. Comment is "Prevent softlocks if we somehow don't have advancetext"
1013 1014/0 Remove textboxes, unlock input, set completestop to false. If there are no crewmates left, fade out and go to state 1014, or if you're playtesting in the editor, return to the editor. Otherwise, go to state 0, fade music in, hide cutscene bars Used when collecting a crewmate. This gamestate only exists if the build of VVVVVV has custom level support
1014 1015 Fade to black, go to state 1015 Used when collecting a crewmate
1015 0 Fade from black, go to state 0, update level stats, quit to menu and play song 6 Used when collecting a crewmate. This gamestate only exists if the build of VVVVVV has custom level support
2000 0 Save the game (as a teleporter save), go to state 0 Used when saving the game
2500 2501 15 Play sound 5, shake the screen for 90 frames, make the screen white for 5 frames, set flashlight to 5, set teleport_to_new_area to true, go to state 2501, play sound 9 Used when activating a teleporter
2501 2502 0 Set flashlight to 5, set teleport_to_new_area to false, go to state 2502, play sound 10 Used when activating a teleporter
2502 2503 5 Make the player visible, reset their color to 0, set their position to the center of the teleporter, modify their velocity, make the teleporter's tile 1, set the teleporter's color to 101 Used when activating a teleporter. When the player is moved to the middle of the teleporter, it's (teleporter_x + 44, teleporter_y + 44), meaning the player is very off-center.
2503 2504 Increase the player's X position by 10 Used when activating a teleporter
2504 2505 Do nothing Used when activating a teleporter. This WOULD be the same as the previous state, but the line which increases the player's X position is commented out
2505 2506 Increase the player's X position by 8 Used when activating a teleporter
2506 2507 Increase the player's X position by 6 Used when activating a teleporter
2507 2508 Do nothing Used when activating a teleporter. The code contains nothing but the line which increments the state
2508 2509 Increase the player's X position by 2 Used when activating a teleporter
2509 2510 15 Increase the player's X position by 1 Used when activating a teleporter
2510 2511 Textbox: Hello?, go to state 2511, play sound 11
2512 2513 Textbox: Is anyone there?, go to state 2513, play sound 11
2514 0 Remove textboxes, unlock input, play song 3
3000 3001 30 Play sound 9, set flashlight to 5, shake the screen for 90 frames, go to state 3001 Used when activating a teleporter (long version for level complete)
3001 3002 15 Set flashlight to 5, go to state 3002, play sound 9 Used when activating a teleporter (long version for level complete)
3002 3003 15 Set flashlight to 5, go to state 3003, play sound 9 Used when activating a teleporter (long version for level complete)
3003 3004 15 Set flashlight to 5, set screenshake to 0, go to state 3004, play sound 9 Used when activating a teleporter (long version for level complete)
3004 3005 0 Set flashlight to 5, set screenshake to 0, go to state 3005, play sound 10 Used when activating a teleporter (long version for level complete)
3005 3006 50 Go to a different state depending on the value of companion. 6 is 3006, 7 is 3020, 8 is 3040, 9 is 3060, 10 is 3080, 11 is 3085, and if translator_exploring_allowtele is true, go to state 3090. Make the player invisible, and reset their color to 0. Destroy the companion, and make the teleporter's tile 1, and set the teleporter's color to 100 Used when activating a teleporter (long version for level complete)
3006 3007 75 Display the level complete textbox, run unlocknum(4), set lastsaved to 4 (Verdigris), stop music. Hardcoded to display (flip)levelcomplete.png
3007 3008 45 Display a crewmate in a textbox, go to state 3008 Hardcoded to display a sprite of a crewmate
3008 3009 45 Show the remaining crewmates, go to state 3009
3009 3010 0 Display the action prompt textbox, go to state 3010
3010 3011/Nothing 30/Nothing If you press ACTION, go to state 3011 If you don't press ACTION, it stays at 3010
3011 3070 0 Go to state 3070
3020 3021 75 Display the level complete textbox, run unlocknum(3), set lastsaved to 2 (Vitellary), stop music. Hardcoded to display (flip)levelcomplete.png
3021 3022 45 Display a crewmate in a textbox, go to state 3022 Hardcoded to display a sprite of a crewmate
3022 3023 45 Show the remaining crewmates, go to state 3023
3023 3024 0 Display the action prompt textbox, go to state 3024
3024 3025/Nothing 30/Nothing If you press ACTION, go to state 3025 If you don't press ACTION, it stays at 3024
3025 3070 0 Go to state 3070
3040 3041 75 Display the level complete textbox, run unlocknum(1), set lastsaved to 5 (Victoria), stop music. Hardcoded to display (flip)levelcomplete.png
3041 3042 45 Display a crewmate in a textbox, go to state 3042 Hardcoded to display a sprite of a crewmate
3042 3043 45 Show the remaining crewmates, go to state 3043
3043 3044 0 Display the action prompt textbox, go to state 3044
3044 3045/Nothing 30/Nothing If you press ACTION, go to state 3045 If you don't press ACTION, it stays at 3044
3045 3070 0 Go to state 3070
3050 3051 75 Display the level complete textbox, run unlocknum(0), set lastsaved to 1 (Violet), stop music. Hardcoded to display (flip)levelcomplete.png
3051 3052 45 Display a crewmate in a textbox, go to state 3052 Hardcoded to display a sprite of a crewmate
3052 3053 45 Show the remaining crewmates, go to state 3053
3053 3054 0 Display the action prompt textbox, go to state 3054
3054 3055/Nothing 30/Nothing If you press ACTION, go to state 3055 If you don't press ACTION, it stays at 3054
3055 3056 10 Fade out, go to state 3056
3056 0 If you've rescewed every crew member, run startlevel_final, otherwise run bigopenworld, unless no cutscene mode is on, then run bigopenworldskip
3060 3061 75 Display the level complete textbox, run unlocknum(2), set lastsaved to 3 (Vermilion), stop music. Hardcoded to display (flip)levelcomplete.png
3061 3062 45 Display a crewmate in a textbox, go to state 3062 Hardcoded to display a sprite of a crewmate
3062 3063 45 Show the remaining crewmates, go to state 3063
3063 3064 0 Display the action prompt textbox, go to state 3064
3064 3065/Nothing 30/Nothing If you press ACTION, go to state 3065 If you don't press ACTION, it stays at 3064
3065 3070 0 Go to state 3070
3070 3071 Fade out, go to state 3071
3071 3072 Increment the state when the screen is fully black. If the screen isn't fully black, it stays on this gamestate until the fade is complete
3072 0 If the last saved crewmate is 2 (Vitellary):
If crewstats[3] (Vermilion is rescued), turn flag 25 on.
If crewstats[4] (Verdigris is rescued), turn flag 26 on.
If crewstats[5] (Victoria is rescued), turn flag 24 on.
If the last saved crewmate is 3 (Vermilion):
If crewstats[2] (Vitellary is rescued), turn flag 50 on.
If crewstats[4] (Verdigris is rescued), turn flag 49 on.
If crewstats[5] (Victoria is rescued), turn flag 48 on.
If the last saved crewmate is 4: (Verdigris)
If crewstats[2] (Vitellary is rescued), turn flag 54 on.
If crewstats[3] (Vermilion is rescued), turn flag 55 on.
If crewstats[5] (Victoria is rescued), turn flag 56 on.
If the last saved crewmate is 5 (Victoria):
If crewstats[2] (Vitellary is rescued), turn flag 37 on.
If crewstats[3] (Vermilion is rescued), turn flag 38 on.
If crewstats[4] (Verdigris is rescued), turn flag 39 on.

Set the companion to 0.

If all crewmates have been rescued, run startlevel_final.

If 4 have been rescued:
Set companion to 11, turn on supercrewmate mode, and start Intermission 1. Run script intermission_1, turn flag 19 on. If lastsaved is 2 (Vitellary), set flag 32 on. If lastsaved is 3 (Vermilion), set flag 35 on. If lastsaved is 4 (Verdigris), set flag 34 on. If lastsaved is 5 (Victoria), set flag 33 on.

If 5 have been rescued:
Start Intermission 2. Run script intermission_2, turn flag 20 on. If lastsaved is 2 (Vitellary), set flag 32 on. If lastsaved is 3 (Vermilion), set flag 35 on. If lastsaved is 4 (Verdigris), set flag 34 on. If lastsaved is 5 (Victoria), set flag 33 on.

For any other amount of rescued crewmates:
Run script regularreturn.
3080 3100/3081 If in an intermission, start fading out, reset the current companion to 0, and go to state 3100. Otherwise, run unlocknum(7), start fading out, reset the current companion to 0, and go to state 3081
3081 3082 If the screen is fully black, go to state 3082
3082 0 Run script regularreturn, and disable finalmode.
3085 3086/3087 If in an intermission, start fading out, reset the current companion to 0, and go to state 3086. Otherwise, run unlocknum(6), start fading out, reset the current companion to 0, and go to state 3087
3086 3087 If the screen is fully black, go to state 3087
3087 0 Run script regularreturn, and disable finalmode
3090 3100 Start fading out, reset the current companion to 0, and go to state 3100. Fade the music out, and turn off supercrewmate mode
3091 3092 60 Fade the music out, and go to state 3092
3092 3100 If the screen is fully black, go to state 3100
3100 3101 If the screen is fully black, go to state 3101
3101 0 Quit to the menu. Play music 6, and go to state 0
3500 3501 120 Fade the music out, go to state 3501
3501 3502 75 Display the game complete text, run unlocknum(5), set Viridian as rescued, play music 7, unlock the vvvvvvgamecomplete achievement Game complete!
3502 3503 60 Display the text All Crew Members Rescued! in a transparent textbox
3503 3504 60 Display the text Trinkets Found: {gamecomplete_n_trinkets} in a transparent textbox
3504 3505 60 Display the text Game Time: {gamecomplete_time} in a transparent textbox
3505 3506 60 Display the text Total Flips: {gamecomplete_n_flips} in a transparent textbox
3506 3507 60 Display the text Total Deaths: {gamecomplete_n_deaths} in a transparent textbox
3507 3508 60 Display the text Hardest Room (with {gamecomplete_hardest_room} death[s]) in a transparent textbox
3508 3509 0 Display the action prompt Press ACTION to continue
3509 3510 30 If the action is pressed, go to state 3510
3510 3511/3520 120/0 Save stats, unlock achievements. If in no death mode, go to state 3520, with a statedelay of 0. Otherwise, go to 3511, with a statedelay of 120
3511 3512 30 Change the player's color to 102. Set flashlight to 5, shake the screen for 90 frames, play sound 9
3512 3513 15 Set flashlight to 5, play sound 9
3513 3514 15 Set flashlight to 5, play sound 9
3514 3515 15 Set flashlight to 5, play sound 9
3515 3516 60 Set flashlight to 5, reset screen shake, set the player's color to 0, make the player invisible, play sound 10, and go to state 3516
3516 3517 Start fading out
3517 3518 If the screen is fully black, go to state 3518
3518 0 30 Start fading in, turn off finalmode and related values, make the cutscene bars instantly appear, set teleport_to_new_area to true, and set teleportscript to gamecomplete
3520 3521 0 Lock player input, mark Viridian as rescued, and start fading out
3521 3522 If the screen is fully black, go to state 3522
3522 0 Go to the no death mode complete screen
4000 4001 10 Start fading out, set flashlight to 5, shake the screen for 10 frames, play sound 9, and go to state 4001 The gamestate and the state delay are set manually to bypass state locking.
4001 4002 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4002 The gamestate and the state delay are set manually to bypass state locking.
4002 4003 10 Reset the player's color to 0, make them invisible. Set the teleporter's tile to 1, and its color to 100. Go to state 4003
4003 0 0 Set teleport_to_new_area to true, and unlock the state lock. The gamestate and the state delay are set manually to bypass state locking.
4010 4011 15 Start fading out, set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4011
4011 4012 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4012
4012 4013 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4013
4013 4014 Increase the player's X position by 10
4014 4015 Increase the player's X position by 10
4015 4016 Increase the player's X position by 8
4016 4017 Increase the player's X position by 6
4017 4018 Increase the player's X position by 3
4018 4019 Increase the player's X position by 1
4019 0 Create the teleporter activity zone, unlock input and go to state 0. If NOT in a time trial, or in no death mode, or in an intermission, then save a telesave
4020 4021 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4021
4021 4022 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4022
4022 4023 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4023
4023 4024 Increase the player's X position by 12
4024 4025 Increase the player's X position by 12
4025 4026 Increase the player's X position by 10
4026 4027 Increase the player's X position by 8
4027 4028 Increase the player's X position by 5
4028 4029 Increase the player's X position by 2
4029 0 Unlock input
4030 4031 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4031
4031 4032 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4032
4032 4033 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4033
4033 4034 Decrease the player's X position by 12
4034 4035 Decrease the player's X position by 12
4035 4036 Decrease the player's X position by 10
4036 4037 Decrease the player's X position by 8
4037 4038 Decrease the player's X position by 5
4038 4039 Decrease the player's X position by 2
4039 0 Unlock input
4040 4041 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4041
4041 4042 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4042
4042 4043 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4043
4043 4044 Increase the player's X position by 12, and decrease the player's Y position by 15
4044 4045 Increase the player's X position by 12, and decrease the player's Y position by 10
4045 4046 Increase the player's X position by 12, and decrease the player's Y position by 10
4046 4047 Increase the player's X position by 8, and decrease the player's Y position by 8
4047 4048 Increase the player's X position by 6, and decrease the player's Y position by 8
4048 4049 Increase the player's X position by 3
4049 0 Unlock input
4050 4051 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4051
4051 4052 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4052
4052 4053 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4053
4053 4054 Increase the player's X position by 4, and decrease the player's Y position by 15
4054 4055 Increase the player's X position by 4, and decrease the player's Y position by 10
4055 4056 Increase the player's X position by 4, and decrease the player's Y position by 10
4056 4057 Increase the player's X position by 4, and decrease the player's Y position by 8
4057 4058 Increase the player's X position by 2, and decrease the player's Y position by 8
4058 4059 Increase the player's X position by 1
4059 0 Unlock input
4060 4061 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4061
4061 4062 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4062
4062 4063 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4063
4063 4064 Decrease the player's X position by 28, and decrease the player's Y position by 8
4064 4065 Decrease the player's X position by 28, and decrease the player's Y position by 8
4065 4066 Decrease the player's X position by 25
4066 4067 Decrease the player's X position by 25
4067 4068 Decrease the player's X position by 20
4068 4069 Decrease the player's X position by 16
4069 0 Unlock input
4070 4071 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4071
4071 4072 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4072
4072 4073 5 Set the player's color to the last rescued crewmate's color, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4073
4073 4074 Increase the player's X position by 10
4074 4075 Increase the player's X position by 10
4075 4076 Increase the player's X position by 8
4076 4077 Increase the player's X position by 6
4077 4078 Increase the player's X position by 3
4078 4079 Increase the player's X position by 1
4079 0 Run the script finallevel_teleporter
4080 4081 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4081
4081 4082 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4082
4082 4083 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4083
4083 4084 Increase the player's X position by 10
4084 4085 Increase the player's X position by 10
4085 4086 Increase the player's X position by 8
4086 4087 Increase the player's X position by 6
4087 4088 Increase the player's X position by 3
4088 4089 Increase the player's X position by 1
4089 0 Run the script gamecomplete_ending
4090 4091 15 Set flashlight to 5, shake the screen for 90 frames, play sound 9, and go to state 4091
4091 4092 0 Set flashlight to 5, reset screen shake, play sound 10, and go to state 4092
4092 4093 5 Reset the player's color to 0, make them visible. Make them face right, and modify their velocity. Teleport them to the center of the teleporter, set the teleporter's tile to 2, and the teleporter's tile to 101. Go to state 4093
4093 4094 Increase the player's X position by 10
4094 4095 Increase the player's X position by 10
4095 4096 Increase the player's X position by 8
4096 4097 Increase the player's X position by 6
4097 4098 Increase the player's X position by 3
4098 4099 Increase the player's X position by 1
4099 0 Run the script levelonecomplete_ending. If no cutscene mode is on, run script levelcompleteskip instead