From Viki
Jump to navigation Jump to search


Custom activity zones

Let's say you want to talk to a crewmate like you can in the ship in the main game.

So first you'll want to place a script box where the activity zone should be. KEEP IN MIND THAT CUSTOM ACTIVITY ZONES ARE SPAWNED AROUND THE PLAYER. NOT around the script box.

In said script, you need to AEM target 35. If you don't know how to do this, use my fakecommands plugin, then type :target(35) in Ved.

After that line, type createactivityzone(#), which will spawn an activity zone with type 35, which is the "custom level terminal" activity zone type.

The script which executes when you activate the activity zone is the last terminal placed in the current room. I would recommend placing a terminal down in ​the room as low as possible so the player can't see it.

An example script is as follows:


Yes, it's that easy.

In 2.3 and below, this spawns an orange activity zone which says "Press <interact key> to activate terminal".

In 2.4 and above, the text and color can be customized, and the default text was changed to "Press <interact key> to interact".

An example of said customization is as follows:

Press %s to talk to Violet

"%s" is replaced with the interact key by VVVVVV. Please use "%s" instead of typing out ENTER, as the interact key can be changed since 2.3.

Freezing and unfreezing the player

Taking away control from the player is simple; just pause the script. However, if you would like to freeze the player so that they instantly stop, that's a tiny bit more difficult. There's no commands that can do this, however there's a state that the game can enter which freezes all entities... maybe you can spot it when collecting a trinket or a crewmate?

When you collect a trinket or a crewmate, it sets the completestop variable to true, which freezes execution of all entities, and spawns cutscene bars and a few other things. After 15 frames, it continues to a state which shows the "you got a shiny trinket!" box.

So to freeze the player without any side effects, we'll have to do as follows:

  1. Start the gamestate
  2. Immediately hide cutscene bars
  3. Exit out of the gamestate so it doesn't continue

This is fairly easy in scripting:

gamestate(1000) # Start the gamestate
delay(1)        # Wait a frame for the gamestate to actually start
endcutscene()   # Immediately remove cutscene bars
gamestate(0)    # Exit out of the gamestate

and to unfreeze the player, simply call gamestate(1003).

If you're using my fakecommands plugin, then you can simply just call :freeze() and :unfreeze().