Skip to content

GrantQuestInteraction ​

Inherits: Interaction < Resource

Interaction that instantly activates a Quest if player meets requirements

Properties ​

intquest_id0
booldisable_after_granttrue
boolhide_if_quest_startedtrue
Stringcustom_interaction_name"":

Methods ​

boolcan_interact( player: Player )
voidstart_interaction( player: Player )
Stringget_interaction_name()
Dictionarysave_state()
voidload_state( state: Dictionary )

Property descriptions ​

int quest_id = 0 ​

The quest to grant when interacted with

bool disable_after_grant = true ​

Whether to disable this interaction after quest is granted

bool hide_if_quest_started = true ​

Whether to hide this interaction if quest is already active or completed

String custom_interaction_name = "": ​

Custom interaction name (if empty, uses quest display name)

Method descriptions ​

bool can_interact( player: Player ) ​

Can the player use it: the quest is not granted yet and the requirements are met?

void start_interaction( player: Player ) ​

Activates the quest for the player.

String get_interaction_name() ​

The name of the interaction in the menu: the custom one, else a default.

Dictionary save_state() ​

What is saved of this interaction

void load_state( state: Dictionary ) ​

Restores whether the quest was granted.