Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameRun
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/run-options.html
Syntaxrun [<script>] (path:<name>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (id:<name>) (speed:<value>/instantly) (delay:<value>)
Short DescriptionRuns a script in a new queue.
Full DescriptionRuns a script in a new queue.

You must specify a script object to run.

Optionally, use the "path:" argument to choose a specific sub-path within a script.

Optionally, use the "def:" argument to specify definition values to pass to the script,
the definitions will be named via the "definitions:" script key on the script being ran,
or numerically in order if that isn't specified (starting with <[1]>).

Alternately, use "defmap:<map>" to specify definitions to pass as a MapTag, where the keys will be definition names and the values will of course be definition values.

Alternately, use "def.<name>:<value>" to define one or more named definitions individually.

Optionally, use the "speed:" argument to specify the queue command-speed to run the target script at,
or use the "instantly" argument to use an instant speed (no command delay applied).
If neither argument is specified, the default queue speed applies (normally instant, refer to the config file).
Generally, prefer to set the "speed:" script key on the script to be ran, rather than using this argument.

Optionally, use the "delay:" argument to specify a delay time before the script starts running.

Optionally, specify the "id:" argument to choose a custom queue ID to be used.
If none is specified, a randomly generated one will be used. Generally, don't use this argument.

The run command is ~waitable. Refer to Language:~waitable.
Related Tags<entry[saveName].created_queue> returns the queue that was started by the run command.
Usage Example
# Use to run a task script named 'MyTask'.
- run MyTask
Usage Example
# Use to run a task script named 'MyTask' that isn't normally instant, instantly.
- run MyTask instantly
Usage Example
# Use to run a local subscript named 'alt_path'.
- run <script> path:alt_path
Usage Example
# Use to run 'MyTask' and pass 3 definitions to it.
- run MyTask def:A|Second_Def|Taco
Usage Example
# Use to run 'MyTask' and pass 3 named definitions to it.
- run MyTask def.count:5 def.type:Taco def.smell:Tasty
Usage Example
# Use to run 'MyTask' and pass a list as a single definition.
- run MyTask def:<list_single[<list[a|big|list|here]>]>
# MyTask can then get the list back by doing:
- define mylist <[1]>
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/RunCommand.java#L31