DialogueActionable3D
An extension of Area3D that can help initiate dialogue.
[!NOTE] When adding nodes from the "Add Child Node" button Godot will attach the GDScript version of the node which is fine for most cases. If you specifically need the C# version then you'll have to attach the script manually.
Signals
actioned
signal actioned()[Signal] public delegate void ActionedEventHandler();Emitted when this actionable has action() called on it.
dialogue_ended
signal dialogue_ended()[Signal] public delegate void DialogueEndedEventHandler();Emitted when the DialogueResource associated with this actionable ends.
[!WARNING] The signal is also emitted if the same resource is used for multiple actionable nodes in the tree.
Properties
dialogue_resource
var dialogue_resource: DialogueResource = nullpublic Resource DialogueResourceThe [DialogueResource] to use when starting dialogue.
dialogue_cue
var dialogue_cue: String = ""[Export] public string DialogueCue = "";The target cue to start dialogue from.
dialogue_balloon
var dialogue_balloon: Node[Export] public PackedScene DialogueBalloon;The dialogue balloon that was last used by calling action() (if there was one).
action_when_scene_starts
var action_when_scene_starts: bool = false[Export] public bool ActionWhenSceneStarts = false;Automatically action this node when the scene starts. Used in conjunction with setting the dialogue resource and cue.
action_when_body_enters
var action_when_body_enters: bool = false[Export] public bool ActionWhenBodyEnters = false;Automatically action this node when a body enters. Used in conjunction with setting the dialogue resource and cue.
last_used_dialogue_balloon
var last_used_dialogue_balloon: Nodepublic Node LastUsedDialogueBalloon;Methods
action
func action() -> voidpublic void Action()Action this actionable. If a DialogueResource and cue have been set on this node then it will start dialogue.
get_nearest_actionable_to
static func get_nearest_actionable_to(target_position: Vector3) -> Actionable3Dpublic static DialogueActionable3D GetNearestActionableTo(Vector3 targetPosition)Find the nearest actionable to a given position.