# Command

It's often required to execute programming code during your script play. Command statements can perform two tasks: Handle Quillscript Variables and Call Functions.

Quillscript is completely compatible with Unreal Engine programming, being it Blueprint Visual Scripting or C++, you can call almost any function from your script at any point.

  • A Command statement starts with a $ (Dollar Sign), immediately followed by a space.
// Quillscript variable handling
$ flag = on

// Function call
$ Play 1

Quillscript Variables
quillscript-variables/

Function Call
function-call/


# Command as Instruction

A Command can also be concatenated to Dialogue, Option, and other Command statements as an instruction.

// In Dialogue.
- Bob | $ MyFunction
  Hello

// In Options.
* Hey   | greet = on | MyFunction
* Leave

// In other Command.
$ Restore | Play 5 | $ a = 10

You can concatenate as many Command instructions as required. They execute in the order they are written.

The Command instruction has a different behavior for each statement type.

Dialogue
Execute before the dialogue plays
Option
Execute when the option is selected
Command
Execute after the main command