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.
Event Group
Alows you to group together parts of your script for organizational purposes.
GBVM Script
Run a GBVM script.
References
/docs/scripting/gbvm/
/docs/scripting/gbvm/gbvm-operations
- 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
Link: Close
Closes an active link session.
Link: Host
Creates a new link session as player 1. This allows player 2 to use the Link: Join event to join the session.
Link: Join
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: Transfer
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 Variableon one player must match the other player'sReceive Variable.Packet Sizemust be the same for both players.- To transfer data in only one direction, the sender can use
$Temp 0as theReceive Variableand the receiver can use$Temp 0as theSend Variable.
- 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, settingSend Variableto$Variable 1with a packet size of5transfers$Variable 1through to$Variable 5in a single transfer. Larger packet sizes take longer to transfer.
Printer
Print Using GB Printer
Send an image to a GB Printer for printing. A GB Printer device must be connected.
- 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.
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 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.
- Thread Handle: The handle for the thread you want to stop.
Thread Start
Run a script in another thread.
- Thread Handle: As the thread starts a handle will be stored in this variable. You can use this handle to stop the thread later.