Skip to content

PlayerExperienceGainedTrigger ​

Inherits: EventTrigger < Resource

Triggers when a player gains a specific amount of experience

Properties ​

PlayerEventAction.PlayerTargetplayer_slotPlayerEventAction.PlayerTarget.ANY_PLAYER
Condition.CheckLogicxp_check_logicCondition.CheckLogic.GREATER_EQUAL
inttarget_experience0

Variables ​

Array[Player]connected_entities[]

Methods ​

Stringget_display_name()
Stringget_function_description()
voidsetup()
voidcleanup()
boolis_matching_player_slot( player: Player )
boolmeets_xp_condition( current_xp: int )
boolis_triggered( event_data: Dictionary )
Stringgenerate_objective_description()

Property descriptions ​

PlayerEventAction.PlayerTarget player_slot = PlayerEventAction.PlayerTarget.ANY_PLAYER ​

Specific player slot to track

Condition.CheckLogic xp_check_logic = Condition.CheckLogic.GREATER_EQUAL ​

Comparison logic for experience check

int target_experience = 0 ​

Experience amount to compare against

Variable descriptions ​

Array[Player] connected_entities = [] ​

Track connected entities to disconnect later

Method descriptions ​

String get_display_name() ​

Return the display name for this trigger

String get_function_description() ​

Return the function description with parameter placeholders

void setup() ​

Set up any listeners or connections needed by this trigger

void cleanup() ​

Clean up any listeners or connections

bool is_matching_player_slot( player: Player ) ​

Check if a player matches the slot requirement

bool meets_xp_condition( current_xp: int ) ​

Check if the current experience meets the comparison logic

bool is_triggered( event_data: Dictionary ) ​

Check if this trigger is currently active

String generate_objective_description() ​

Generate quest objective description