Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

YarnInstruction

Represents a single instruction in a yarn node.
class_name YarnInstruction
extends Resource

Inherits from Resource

#Nested Types

#Properties

#bool_value

var bool_value: bool = false

Type bool

#command_text

var command_text: String = ""

Type String

#complexity_score

var complexity_score: int = 0

Type int

#content_id

var content_id: String = ""

Type String

#destination

var destination: int = 0

Type int

#float_value

var float_value: float = 0.0

Type float

#function_name

var function_name: String = ""

Type String

#has_condition

var has_condition: bool = false

Type bool

#line_id

var line_id: String = ""

Type String

#node_name

var node_name: String = ""

Type String

#opcode

var opcode: int = 14

Type int

#string_value

var string_value: String = ""

Type String

#substitution_count

var substitution_count: int = 0

Type int

#variable_name

var variable_name: String = ""

Type String

#Methods

#add_option(String, int, int, bool)

static func add_option(id: String, dest: int, subs: int, has_cond: bool) -> YarnInstruction

Parameters

  • idString
  • destint
  • subsint
  • has_condbool

Returns YarnInstruction

#add_saliency_candidate_from_node(String, int)

static func add_saliency_candidate_from_node(name: String, dest: int) -> YarnInstruction

Parameters

  • nameString
  • destint

Returns YarnInstruction

#add_saliency_candidate(String, int, int)

static func add_saliency_candidate(id: String, complexity: int, dest: int) -> YarnInstruction

Parameters

  • idString
  • complexityint
  • destint

Returns YarnInstruction

#call_func(String)

static func call_func(name: String) -> YarnInstruction

Parameters

  • nameString

Returns YarnInstruction

#detour_to_node(String)

static func detour_to_node(name: String) -> YarnInstruction

Parameters

  • nameString

Returns YarnInstruction

#jump_if_false(int)

static func jump_if_false(dest: int) -> YarnInstruction

Parameters

  • destint

Returns YarnInstruction

#jump_to(int)

static func jump_to(dest: int) -> YarnInstruction

Parameters

  • destint

Returns YarnInstruction

#peek_and_detour_to_node()

static func peek_and_detour_to_node() -> YarnInstruction

Returns YarnInstruction

#peek_and_jump()

static func peek_and_jump() -> YarnInstruction

Returns YarnInstruction

#peek_and_run_node()

static func peek_and_run_node() -> YarnInstruction

Returns YarnInstruction

#pop()

static func pop() -> YarnInstruction

Returns YarnInstruction

#push_bool(bool)

static func push_bool(value: bool) -> YarnInstruction

Parameters

  • valuebool

Returns YarnInstruction

#push_float(float)

static func push_float(value: float) -> YarnInstruction

Parameters

  • valuefloat

Returns YarnInstruction

#push_string(String)

static func push_string(value: String) -> YarnInstruction

Parameters

  • valueString

Returns YarnInstruction

#push_variable(String)

static func push_variable(name: String) -> YarnInstruction

Parameters

  • nameString

Returns YarnInstruction

#return_inst()

static func return_inst() -> YarnInstruction

Returns YarnInstruction

#run_command(String, int)

static func run_command(text: String, subs: int) -> YarnInstruction

Parameters

  • textString
  • subsint

Returns YarnInstruction

#run_line(String, int)

static func run_line(id: String, subs: int) -> YarnInstruction

Parameters

  • idString
  • subsint

Returns YarnInstruction

#run_node(String)

static func run_node(name: String) -> YarnInstruction

Parameters

  • nameString

Returns YarnInstruction

#select_saliency_candidate()

static func select_saliency_candidate() -> YarnInstruction

Returns YarnInstruction

#show_options()

static func show_options() -> YarnInstruction

Returns YarnInstruction

#stop()

static func stop() -> YarnInstruction

Returns YarnInstruction

#store_variable(String)

static func store_variable(name: String) -> YarnInstruction

Parameters

  • nameString

Returns YarnInstruction

Generated from Yarn Spinner for Godot GDScript 3.3.