Skip to main content

Miscellaneous

Comment

Allows you to leave notes within your scripts. Provides no functionality in-game. The text you type automatically gets set in the event title, so you can collapse the comment and still read its content.

Comment
Text...

Event Group

Alows you to group together parts of your script for organizational purposes.

Event Group
Add Event

GBVM Script

Run a GBVM script.

References
/docs/scripting/gbvm/
/docs/scripting/gbvm/gbvm-operations

GBVM Script
Script
References
Add Reference
  • Script: A valid GBVM Script to execute.
  • References: A list of the assets and entities used in your GBVM script. Use this to let GB Studio know that a file is needed by your script, preventing it from being excluded in the final build.

Multiplayer

Closes an active link session.

Link: Close
Close the current link session.

Creates a new link session as player 1. This allows player 2 to use the Link: Join event to join the session.

Link: Host
Host a link session.

Join an active link session as player 2. The session must first be created by another player using the Link: Host event. This event must be executed before any kind of data transfer between player 1 and player 2. Trying to send or receive data before this event will immediately fail and/or freeze the game.

Link: Join
Join a link session.

Transfer data to the other player in an active link session. This event can only be used after a successful Link: Host or Link: Join event.

Both players must execute Link: Transfer using matching settings:

  • Send Variable on one player must match the other player's Receive Variable.
  • Packet Size must be the same for both players.
  • To transfer data in only one direction, the sender can use $Temp 0 as the Receive Variable and the receiver can use $Temp 0 as the Send Variable.
Link: Transfer
Send Variable
$Variable0
Receive Variable
$Variable0
Packet Size
1
  • Send Variable: The variable to send to the other player.
  • Receive Variable: The variable used to store the value received from the other player.
  • Packet Size: The number of consecutive variables to transfer.
    For example, setting Send Variable to $Variable 1 with a packet size of 5 transfers $Variable 1 through to $Variable 5 in a single transfer. Larger packet sizes take longer to transfer.

Printer

Send an image to a GB Printer for printing. A GB Printer device must be connected.

Print Using GB Printer
Print Source
Background
Margin
2
If Print Successful
Success
Add Event
Else
Error
Add Event
  • Print Source: The location of the image data to print.
  • Margin: The number of empty lines to leave after printing.
  • Y: The line to start printing.
  • Height: The number of lines to print.
  • Success: The script to run on success.
  • Error: The script to run on error.

Threads

Pause Logic For Scene Type

Prevent the current scene's game engine update function from running until resumed. Allows preventing player control during multi-threaded scripts.

Pause Logic For Scene Type
Prevent the current scene's game engine update function from running until resumed. Allows preventing player control during multi-threaded scripts.

Resume Logic For Scene Type

Resume the game engine update function for the current scene.

Resume Logic For Scene Type
Resume the game engine update function for the current scene.

Script Lock

Pause other scripts and scene updates until this script has finished or is unlocked.

Script Lock
Pause other scripts and scene updates until this script has finished or is unlocked.

Script Unlock

If locked, unlock this script so other scripts can run and the scene can update.

Script Unlock
If locked, unlock this script so other scripts can run and the scene can update.

Stop Thread

Stop a thread based on the selected thread handle.

Stop Thread
Thread Handle
$Variable0
  • Thread Handle: The handle for the thread you want to stop.

Thread Start

Run a script in another thread.

Thread Start
Thread Handle
$Variable0
Run In Background
Add Event
  • Thread Handle: As the thread starts a handle will be stored in this variable. You can use this handle to stop the thread later.