List of internal commands

This page is a list of internal commands usable in Internal scripting.

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 (activeteleporter).

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 your telesave cannot be overwritten anyway), and a teleporter activity zone will not spawn.

Calling this command in a room with no teleporters will trigger undefined behavior in 2.2 and below, and do nothing in 2.3.

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 (activateteleporter), 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 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.

Calling this command in a room with no teleporters will trigger undefined behavior in 2.2 and below, and do nothing in 2.3.

alarmoff
alarmoff

Turn the alarm off (see alarmon).

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 alarmoff is called.

altstates
altstates ( )

Set the alt state to. By default, the alt state is. Custom levels do not support alt states at all, unless you use VVVVVV: Community Edition.


 * : 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.

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 fadeout, without the animation of fadein.

blackon
blackon

Turn off blackout mode (see blackout).

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 the "Game paused" screen will still render when the game is unfocused; but the text boxes seem to have priority over the "Game paused" screen (the text boxes 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, roomtext 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, if the player has control, they can only flip one time while the game is in this mode.

This mode is turned off when the player exits to the main menu, or when blackon 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.

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 restoreplayercolour)
 * (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 restoreplayercolour)
 * (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)

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.

ifwarp
ifwarp (, ,  ,  )

Check if the warp background of the given room is a certain warp background, and if so, jump to the given script.

This command can be used in internal scripting without having to prefix either the command with  or the script with. You cannot jump to a main game script with this command, but you could jump to a custom script that jumps to a main game script.

In 2.2 and below, if the room number you end up indexing (which is just, without accounting for 1-indexing, ) is not in the range 0..399, undefined behavior will be triggered. In 2.3, this undefined behavior is fixed.


 * : The x-coordinate of the room whose warp background you want to check, 1-indexed.
 * : The y-coordinate of the room whose warp background you want to check, 1-indexed.
 * : The warp background to check. There are four intended values:
 * : No warping
 * : Horizontal
 * : Vertical
 * : All sides
 * Additionally, you can set the warp dir of the room to any arbitrary integer with, and then check that arbitrary value with this command.


 * : The custom script to jump to, if the check succeeds.

warpdir
warpdir (, ,  )

Set the warp background of the given room, permanently for the given session. The changed warp background will not be preserved if you quicksave, quit, and load the level from the save again, but leaving the room and coming back will not reset its warp background to what it was originally. This means you can set the warp background of a certain room without having to be in it.

There is a bug with this command in versions 2.2 and below where if you are in a room with the Lab or Warp Zone tileset, and you set the warp background to none (e.g. make the room no longer warp anymore), instead of setting it to the Lab or stars-up background, it will set it to the stars-left background, always. But leaving and coming back will set the room's background to what it's supposed to be. In 2.3, this bug is fixed.

In 2.2 and below, if the room number you end up indexing (which is just, without accounting for 1-indexing, ) is not in the range 0..399, undefined behavior will be triggered. In 2.3, this undefined behavior is fixed.


 * : The x-coordinate of the room to target, 1-indexed.
 * : The y-coordinate of the room to target, 1-indexed.
 * : The warp background to set the room to. There are four intended values:
 * : No warping
 * : Horizontal
 * : Vertical
 * : All sides
 * All other values will still succeed in setting the warp dir to that value, and will make the room no longer warp, but the background will still be there.