List of internal commands

This page is a list of internal commands usable in Internal scripting. For a list of simplified commands, see List of simplified commands.

activateteleporter
activateteleporter

Make the first spawned teleporter in the room do its actively-teleporting animation, and change it to be the flashy teleporting color. This will happen even if the teleporter is already white.

It matters which one of  or   is run first, even if they happen on the same frame.

Touching the first spawned teleporter after this command is run will not overwrite your  in 2.2 and below (in 2.3 and later your telesave cannot be overwritten anyway), and a teleporter activity zone will not spawn.

activeteleporter
activeteleporter

Make the first spawned teleporter in the room light up, although it will not do the pulsating animation that an activated teleporter usually does. If the first spawned teleporter is already doing the pulsating animation and is doing the flashy teleport color, then this command will make it white, but it won't stop its animation.

It matters which one of  or   is run first, even if they happen on the same frame.

Touching the first spawned teleporter after this command is run will still overwrite your  in 2.2 and below (in 2.3 and later your telesave cannot be overwritten anyway), and a teleporter activity zone will still spawn. However, if this is run after, then it won't overwrite your  , and a teleporter activity zone will not spawn.

alarmoff
alarmoff

Turn the alarm off (see ).

alarmon
alarmon

Turn the alarm on. More specifically, it periodically plays sound effect 19, every 20 frames, until it is turned off.

It is temporarily paused when either the ESC/ENTER/teleporter screen or "Game paused" screen is up.

The alarm is turned off when the player exits to the main menu, or when  is called.

altstates
altstates ( )

Set the alt state to. By default, the alt state is. Custom levels do not support alt states at all.


 * : The alt state to be set to. Different alt states will make different versions of rooms appear when you go to them in the main game map.
 * the version of the trinkets room in the ship with the giant trinkets warp
 * the version of the Secret Lab spawn room with both obstructing pillars
 * the version of the Secret Lab spawn room with one obstructing pillar destroyed
 * the version of the Secret Lab spawn room with one obstructing pillar destroyed
 * the version of the Secret Lab spawn room with one obstructing pillar destroyed

Note that the alternate version of Prize for the Reckless that removes the spikes to the trinket along with changing the roomname to "I Can't Believe You Got This Far" in No Death Mode or "Imagine Spikes There, if You Like" in Time Trials is not handled by alt states. Instead, the room is simply loaded differently if the game is in No Death Mode or in a Time Trial.

audiopause
audiopause ( )

Force-enable or disable the audio pause, regardless of the audio pause state in game options. By default, this is off, i.e. allow audio to keep playing during unfocus pause.


 * : The state to set the audio pause to. Either  or  . Anything else has no effect.

This command is unused in the main game.

backgroundtext
backgroundtext

For the text box in memory, do not initiate an ACTION prompt when  or   is called.

befadein
befadein

Instantly undo a faded- or fading- in screen caused by, without the animation of.

blackon
blackon

Turn off blackout mode (see ).

blackout
blackout

Turn on blackout mode.

In this mode, the screen will keep rendering on each frame whatever was rendered last on the screen. However things can still render on the screen and overwrite what's supposed to be frozen.

Most notably, text boxes will still appear, and in 2.2 and below, the "Game paused" screen will still render when the game is unfocused (but it no longer renders in 2.3 and later); but the text boxes always render on top no matter what. These text boxes include the activity zone prompts, the teleporter activity zone prompt and the teleporter "Game saved". As well, room text will always render onscreen.

The ESC screen brought up by pressing ESC, and pause screen and teleporter screen brought up by pressing ENTER will still render, but it seems that during their animations of being brought up or down, the background is a copy of the last ESC/ENTER/teleporter screen that was brought down. If an ESC/ENTER/teleporter screen hasn't been brought down, then it simply defaults to a solid black screen.

Additionally, the player's on-ground and on-roof flipping eligibility is unchanged while in this state. This means that if they are eligible to flip off the floor but not eligible to flip off of the ceiling at the time this command is run, they can always flip off of the floor, but never be able to flip off of the ceiling; and vice versa. Similarly, if they are neither eligible to flip off the floor or ceiling when this command is run, they will never be able to flip at all.

When used while the screen is shaking from  and screen effects are enabled, the screen will turn completely black (as the name suggests), since the screen buffer is cleared while the screen is shaking. This is how the command is used in the main game, for the intro cutscene and the Secret Lab discovery cutscene.

This mode is turned off when the player exits to the main menu, or when  is called.

bluecontrol
bluecontrol

Run Victoria's activity zone script, which also creates Victoria's activity zone when finished.

changeai
changeai ( ,  , [position])

Set the behavior of a crewmate.


 * : The identifier of the  entity. See the section on   identifiers.
 * : Can be any of the behaviors from the following list:
 * (this will actually follow the pink-colored entity)
 * (requires field 3, "position", to specify position)
 * (this will actually follow the pink-colored entity)
 * (requires field 3, "position", to specify position)
 * (this will actually follow the pink-colored entity)
 * (requires field 3, "position", to specify position)
 * (this will actually follow the pink-colored entity)
 * (requires field 3, "position", to specify position)
 * (requires field 3, "position", to specify position)
 * (requires field 3, "position", to specify position)
 * (requires field 3, "position", to specify position)


 * The behaviors prefixed with "follow" (other than ) will make the crewmate try to get close to the x-position of the target crewmate or player, and the crewmate will not try anything in regards to reaching the y-position of the target crewmate or player.


 * and  will do what their names say.


 * will make the crewmate periodically move back and forth, like in the main game cutscene where the game shows you where the lost crewmates are in their respective rooms, and they're pacing back and forth and being all worried.


 * requires using the third field to specify the given position that the crewmate should follow.


 * : Required when the behavior is, to specify the x-position the crewmate should try to move to. Otherwise unused.


 * Note that since the code for this behavior is reused from the behavior to follow another crewmate or the player, the crewmate will stop short of the targeted x-position, and the distance they are short by will vary, depending on pixel alignment, between 12 and 17 pixels inclusive if the target position is to the right of the crewmate, or between 32 and 37 pixels inclusive if the target position is to the left of the crewmate. Additionally, if the crewmate is already within 33 pixels inclusive of the target position to the right of them, or 35 pixels inclusive of the target position to the left of them, they will not move. However, even if they don't move, they will turn to face the target position if it is at least 6 pixels away in either direction from their x-coordinate.

changecolour
changecolour ( ,  )

Change the color (and identifier) of a  entity to another one. However, you cannot change the identifier of the player.


 * : The identifier of the  entity. See the section on   identifiers.


 * : The color (and identifier) to change the crewmate to, but you cannot change the identifier of the player.

changecustommood
changecustommood ( ,  )

Change the mood of the first-placed rescuable crewmate edentity in the room.


 * : The identifier of the rescuable crewmate. Can be any of the following:
 * (this will actually target the pink-colored rescuable crewmate)
 * (this will actually target the pink-colored rescuable crewmate)
 * (this will actually target the pink-colored rescuable crewmate)
 * (this will actually target the pink-colored rescuable crewmate)
 * (this will actually target the pink-colored rescuable crewmate)
 * (this will actually target the pink-colored rescuable crewmate)


 * If it's not any one of these, it will default to the player.


 * : The mood to make the rescuable crewmate.  is happy, anything that is nonzero is sad. Usually people use   to make the rescuable crewmate sad.

changedir
changedir ( ,  )

Change the direction variable of the given crewmate. If the direction is, the crewmate is facing left; otherwise, when the value is nonzero, they will be facing right, usually with a value of.


 * : The identifier of the  entity. See the section on   identifiers.


 * : The direction to make the crewmate face.  is left, anything that is nonzero is facing right. Usually people use   to face right.

changegravity
changegravity ( )

Add 12 to the current sprite offset of the given crewmate. This is not functionally equivalent to, it's more like.


 * : The identifier of the  entity. See the section on   identifiers.

This command is unused in the main game.

changemood
changemood ( ,  )

Change the mood of the given crewmate. More specifically, it changes the sprite offset depending on what you give for. This means this is functionally equivalent to  if you give   to   and   if you give anything nonzero (usually  ) to it.


 * : The identifier of the  entity. See the section on   identifiers.


 * : The mood to make the crewmate.  is happy, anything that is nonzero is sad. Usually people use   to make the crewmate sad.

changeplayercolour
changeplayercolour ( )

Set the color of the player.


 * : Can be any of the colors from the following list:
 * (same effect as )
 * (this is actually pink)
 * (rapidly cycles through random colors for flashy effect, actually unused in the main game, intended to be used before player teleports)
 * (same effect as )
 * (this is actually pink)
 * (rapidly cycles through random colors for flashy effect, actually unused in the main game, intended to be used before player teleports)
 * (rapidly cycles through random colors for flashy effect, actually unused in the main game, intended to be used before player teleports)

changerespawncolour
changerespawncolour ( )

Set the respawn color of the player. By default, this will be. The respawn color persists through save files.


 * : Can be any of the colors from the following list:
 * (this is actually pink)
 * (rapidly cycles through random colors for flashy effect)
 * Any number from the list of entity colors
 * (this is actually pink)
 * (rapidly cycles through random colors for flashy effect)
 * Any number from the list of entity colors
 * (rapidly cycles through random colors for flashy effect)
 * Any number from the list of entity colors

This command is unused in the main game.

changetile
changetile ( ,  )

Set the sprite offset of the given crewmate. Then, the final sprite rendered, the sprite number, will be the crewmate's animation offset plus the sprite offset given. However, the sprite offset is ignored if the player is currently dying.

The sprite number is fetched from each 32x32 box in, or   if the game is in flip mode. The sprite to be fetched from  or   is obtained by dividing the sprite number by 12 while keeping an integer remainder - the non-remainder will then be the row, and the remainder will be the column.

Note that the final sprite (the animation offset plus the sprite offset) must be in the range of 0..191 inclusive; otherwise the game will try to fetch a nonexistent sprite, and then segfault. Except in 2.3 and later, where this segfault is fixed and doesn't happen, and instead the crewmate or player simply doesn't render at all.


 * : The identifier of the  entity. See the section on   identifiers.


 * : The sprite offset to set the crewmate to. The final sprite will be the sprite offset plus the animation offset.


 * Here are the animation offsets for the various sprites:


 * {| class="wikitable"

! Offset
 * Flipped
 * Direction
 * Animation
 * On the floor
 * Facing right
 * Standing still
 * On the floor
 * Facing right
 * Walking 1
 * On the floor
 * Facing right
 * Walking 2
 * On the floor
 * Facing left
 * Standing still
 * On the floor
 * Facing left
 * Walking 1
 * On the floor
 * Facing left
 * Walking 2
 * On the ceiling
 * Facing right
 * Standing still
 * On the ceiling
 * Facing right
 * Walking 1
 * On the ceiling
 * Facing right
 * Walking 2
 * On the ceiling
 * Facing left
 * Standing still
 * On the ceiling
 * Facing left
 * Walking 1
 * On the ceiling
 * Facing left
 * Walking 2
 * }
 * On the ceiling
 * Facing right
 * Walking 1
 * On the ceiling
 * Facing right
 * Walking 2
 * On the ceiling
 * Facing left
 * Standing still
 * On the ceiling
 * Facing left
 * Walking 1
 * On the ceiling
 * Facing left
 * Walking 2
 * }
 * Facing left
 * Walking 1
 * On the ceiling
 * Facing left
 * Walking 2
 * }
 * Walking 2
 * }


 * These are the death sprites, which will ignore the sprite offsets:


 * {| class="wikitable"

! Offset
 * Flipped
 * Direction
 * Animation
 * On the floor
 * Facing right
 * Dying
 * On the floor
 * Facing left
 * Dying
 * On the ceiling
 * Facing right
 * Dying
 * On the ceiling
 * Facing left
 * Dying
 * }
 * Facing right
 * Dying
 * On the ceiling
 * Facing left
 * Dying
 * }
 * Dying
 * }

clearteleportscript
clearteleportscript

Clear the teleport script. This restores the action that happens upon pressing ENTER at a teleporter to simply bringing up the teleporter screen, which would have been set by.

This command is unused in the main game.

companion
companion ( )

Set the companion to accompany the player.

This means that if you load a room within the hardcoded spawn range of a crewmate, the game will spawn a  entity at the player's x-position with behavior , at a hardcoded y-position specific to each companion. This entity can be manipulated like normal with any command that targets  crewmates.

The ranges of rooms a companion will properly spawn in depend on the location of their intended teleporter room in the main game. This range is the row of rooms their intended teleporter room rests on, and if the crewmate spawns unflipped, all the rooms below; if the crewmate spawns flipped, all the rooms above. This does not apply to the intermission crewmates.

When a room is loaded in the same column of the intended teleporter room, the crewmate will spawn at a hardcoded x-position instead of spawning at the player's position.

Note that the reported hardcoded x- and y- positions here do not account for  entity pixel offset.


 *  : The number of the companion. All other values have no effect. The numbering starts at 6 most likely to be extra safe with avoiding conflicts with the IDs used for.


 * : Verdigris. He will spawn unflipped. His hardcoded y-position is 120, which is standing on the floor of tiles at tile position y=18.


 * His intended teleporter room is (16,1), which is "Murdering Twinmaker" in the main game.


 * : Vitellary. He will spawn flipped. His hardcoded y-position is 88, which is standing on the ceiling of tiles at tile position y=10.


 * His intended teleporter room is (11,6), which is "Energize" in the main game. His intended teleporter room movement is to spawn somewhere offscreen to the right, and follow the player until he hits x-position 144, which corresponds with there being some sort of invisible barrier to him at tile position x=17.


 * : Victoria. She will spawn unflipped. Her hardcoded y-position is 176, which is standing on the floor of tiles at tile position y=25.


 * Her intended teleporter room is (3,5), which is "Philadelphia Experiment" in the main game. Her intended teleporter room x-position is 316.


 * : Vermilion. He will spawn unflipped. His hardcoded y-position is 184, which is standing on the floor of tiles at tile position y=26.


 * His intended teleporter room is (12,5), which is "Building Apport" in the main game.


 * : The Intermission 2 crewmate.


 * : The Intermission 1 crewmate.

createactivityzone
createactivityzone ( )

Create an activity zone.

The activity zone is hardcoded to be 96 pixels by 240 pixels, or 96 pixels by 60 pixels if the color is. The activity zone will spawn at the position of the crewmate with the corresponding color, 32 pixels to the left horizontally. If the color is, it will spawn 20 pixels above the crewmate; otherwise it will spawn at 0. The text and color of the activity zone prompt will be hardcoded accordingly.

If the crewmate color is invalid, then it will default to the player, along with using whatever value of  persisted from previous commands.


 * : The color of the crewmate. Either,  ,  ,  , or   (actually pink). All other values are invalid.

createcrewman
createcrewman (, ,  ,  ,  , [position])

createentity
createentity (, ,  ,  ,  , [p1], [p2], [p3], [p4])

createlastrescued
createlastrescued

createrescuedcrew
createrescuedcrew

cutscene
cutscene

Make the black bars indicating a cutscene is in progress appear.

This command does not do a delay on its own. To do a delay, use.

do
do ( )

Set the loop counter to the given number, and set the loop position to the current line number of the running script.

This command is intended to be used in conjunction with  to produce a block of commands that will be repeated a certain amount of times, e.g.:

do(5) text(gray,-1,-500,1) This text box repeats 5 times! speak endtext loop

But there is no requirement that there be a  command, or that the   command even be in the same script. In fact, it is possible to cleverly use  and   in such a way to jump into the middle of other scripts. This is a technique known as do-pointers.

This command is unused in the main game.

endcutscene
endcutscene

Make the black bars prompted by  disappear.

This command does not do a delay on its own. To do a delay, use.

endtext
endtext

endtextfast
endtextfast

entersecretlab
entersecretlab

Turns on Secret Lab mode. In this mode, you cannot save the game.

Additionally, this command also explores all rooms, and unlocks the Secret Lab play mode in the main menu.

turns off Secret Lab mode.

everybodysad
everybodysad

face
face ( ,  )

fadein
fadein

fadeout
fadeout

finalmode
finalmode (, )

Turns on finalmode, then loads the room at the specified coordinates.

This is used to move around finalmode instead of the regular, because that command adds an offset of 100 to the position in finalmode coordinates in order to load rooms in the main dimension.


 * : The x-coordinate of the room to load.
 * : The y-coordinate of the room to load.

flash
flash ( )

flip
flip

Presses the ACTION button, causing the player to flip if eligible. This command also does 1 frame of delay.

If there is an ACTION prompt onscreen and the prompt is gamestate-based, this ACTION press will dismiss it. Script-based ACTION prompts cannot be dismissed because this command can't run at the same time as the prompt.

It is a common pitfall for this command to not work when placed right after an ACTION prompt. This is because the ACTION-down input frame from the player to dismiss the prompt is immediately followed by an ACTION-down input frame from this command with no intervening ACTION-up input frame, so this ACTION-down input frame gets treated like an ACTION hold instead of an ACTION press. The usual workaround is to put a  before this command.

flipgravity
flipgravity ( )

flipme
flipme

Marks that the text box should be vertically repositioned if the player is in Flip Mode.

foundlab
foundlab

foundlab2
foundlab2

foundtrinket
foundtrinket ( )

gamemode
gamemode ( )

gamestate
gamestate ( )

gotoposition
gotoposition (, ,  )

gotoroom
gotoroom (, )

Load the room with the given coordinates.

If the player is already in said room, the room is still reloaded.

If the coordinates given are outside the map, they are wrapped around to the other edge of the map. E.g. in a 10x10 map,  is equivalent to   and   is equivalent to.


 * : The x-coordinate of the room to load.
 * : The y-coordinate of the room to load.

greencontrol
greencontrol

Run Verdigris's activity zone script, which also creates Verdigris's activity zone when finished.

hascontrol
hascontrol

hidecoordinates
hidecoordinates (, )

On the map, hides the room at the given coordinates. Note that loading this room afterwards (e.g. by a screen transition) will still show the room again on the map. is the opposite of this command.


 * : The x-coordinate of the room to hide.
 * : The y-coordinate of the room to hide.

hideplayer
hideplayer

Makes the player invisible.

This is the opposite of.

hidesecretlab
hidesecretlab

On the map, hides the rooms corresponding to the Secret Lab in the main game. is the opposite of this command.

These rooms are (0-indexed):


 * (16, 5)
 * (17, 5)
 * (18, 5)
 * (17, 6)
 * (18, 6)
 * (19, 6)
 * (19, 7)
 * (19, 8)

hideship
hideship

On the map, hides the rooms corresponding to the Ship in the main game. is the opposite of this command.

These rooms are (0-indexed):


 * (2, 10)
 * (3, 10)
 * (4, 10)
 * (2, 11)
 * (3, 11)
 * (4, 11)

hidetargets
hidetargets

hideteleporters
hideteleporters

hidetrinkets
hidetrinkets

ifcrewlost
ifcrewlost ( )

ifexplored
ifexplored (, ,  )

iflast
iflast ( ,  )

ifskip
ifskip ( )

jukebox
jukebox ( )

leavesecretlab
leavesecretlab

Turns off Secret Lab mode (see ).

This command is unused in the main game.

loadscript
loadscript ( )

loop
loop

Decrement the loop counter. If the counter is greater than 0 after this, then jump to the line number stored in the loop position.

This command is intended to be used in conjunction with. See the documentation for  for more information.

This command is unused in the main game.

missing
missing ( )

moveplayer
moveplayer ( ,  )

musicfadein
musicfadein

musicfadeout
musicfadeout

nocontrol
nocontrol

play
play ( )

playef
playef ( )

position
position ( , [vertical])

purplecontrol
purplecontrol

Run Violet's activity zone script, which also creates Violet's activity zone when finished.

redcontrol
redcontrol

Run Vermilion's activity zone script, which also creates Vermilion's activity zone when finished.

rescued
rescued ( )

resetgame
resetgame

restoreplayercolour
restoreplayercolour

Set the player's color back to cyan.

This is functionally equivalent to.

resumemusic
resumemusic

rollcredits
rollcredits

Immediately play the credits of the main game.

This also overwrites the main game telesave and deletes the main game quicksave when the credits is finished.

setactivitycolour
setactivitycolour ( )

setactivitytext
setactivitytext  

setactivityposition
setactivityposition ( )

setcheckpoint
setcheckpoint

shake
shake ( )

showcoordinates
showcoordinates (, )

On the map, reveals the room at the given coordinates. is the opposite of this command.


 * : The x-coordinate of the room to show.
 * : The y-coordinate of the room to show.

showplayer
showplayer

Makes the player visible.

This is the opposite of.

showsecretlab
showsecretlab

On the map, reveals the rooms corresponding to the Secret Lab in the main game. is the opposite of this command.

These rooms are (0-indexed):


 * (16, 5)
 * (17, 5)
 * (18, 5)
 * (17, 6)
 * (18, 6)
 * (19, 6)
 * (19, 7)
 * (19, 8)

showship
showship

On the map, reveals the rooms corresponding to the Ship in the main game. is the opposite of this command.

These rooms are (0-indexed):


 * (2, 10)
 * (3, 10)
 * (4, 10)
 * (2, 11)
 * (3, 11)
 * (4, 11)

showtargets
showtargets

showtrinkets
showtrinkets

speak
speak

speak_active
speak_active

specialline
specialline ( )

Replaces text box lines with hardcoded strings. Used for two particular main game lines that want the name of a random unrescued crewmate.

<ul> <li> : Can be 1 or 2; the command does nothing otherwise.</li> <ul> <li> : Sets the text box to be .</li> <li> : If there are less than 5 rescued crewmates, two lines will be appended: to helping you find the rest of the crew! Else,  is appended.</li> </ul> </ul>

squeak
squeak ( )

Plays a sound corresponding to particular characters speaking/emoting.


 * : Which sound to play.
 * or : Viridian squeaking. Equivalent to.
 * : Vermilion squeaking. Equivalent to.
 * : Verdigris squeaking. Equivalent to.
 * : Vitellary squeaking. Equivalent to.
 * : Victoria squeaking. Equivalent to.
 * : Violet squeaking. Equivalent to.
 * : Sad characters squeaking. Equivalent to.
 * : Terminals squeaking. Equivalent to.

startintermission2
startintermission2

An unused command left over from development that attempts to start Intermission 2.

It turns on finalmode, then sets the checkpoint to 228,129, unflipped and facing left, in (53,49) (Intermission 2 start room), but then s to (46,54) (Intermission 1 start room).

stopmusic
stopmusic

Stops any currently playing music.

teleportscript
teleportscript ( )

telesave
telesave

text
text ( , <x>, <y>,  ) <lines...>

textboxactive
textboxactive

tofloor
tofloor

Acts identically to flip if the player is currently flipped.

trinketbluecontrol
trinketbluecontrol

Run special logic after Victoria gives you a trinket after talking to her in the main game.

If 20 trinkets are collected and flag 67 is on, then this starts the Secret Lab entrance cutscene. Otherwise, it will run a regular cutscene, and also create Victoria's activity zone when finished.

trinketscriptmusic
trinketscriptmusic

Plays Passion for Exploring. Does nothing else.

This command is unused in the main game.

trinketyellowcontrol
trinketyellowcontrol

Run the cutscene after Vitellary gives you a trinket after talking to him in the main game, which is different depending on whether you've collected 19 trinkets or not. This will also create Vitellary's activity zone when finished.

undovvvvvvman
undovvvvvvman

Undo the effects of, returning the player character to their normal state.

untilbars
untilbars

untilfade
untilfade

vvvvvvman
vvvvvvman

Change the player character into the large character shown in the Secret Lab's introduction cutscene. Collision is very glitchy.

walk
walk ( ,  )

yellowcontrol
yellowcontrol

Run Vitellary's activity zone script, which also creates Vitellary's activity zone when finished.