Skip to content

Goals

Goals function as a significant way of driving player engagement within an IdleKit game. They allow the player to be rewarded for performing certain actions within the game, such as claiming a StoreTimedReward or making a Trade; or progressing through a Stage, such as unlocking a Generator or accumulating a certain amount of Currency. Goals are a type of IActivatable.

Relationships

goalrelationships

Goal Tracks

Each Stage contains several Goal Tracks that each contains multiple Goals. The number of Goal Tracks and the number of Goals within those can vary from Stage to Stage.

Players complete the Goals in each track sequentially. Once a player has completed a certain number of Goals from any Goal Track (specified via NumberOfGoalsRequired), they can Ascend to the next Stage.

Tracking Goals

The currently active Goals in a Stage can be grabbed via GetActiveGoals. The length of the returned array is equal to the number of Goal Tracks within the Stage, minus the number of tracks that have already been completed.

Goal Actions

There are a number of Actions related to Goals:

CreateGoalStateAction

A Player State Action that is fired whenever a new Goal is activated within a Stage.

ClaimGoalStateAction

A Player State Action that is fired whenever a Stage Goal is claimed by the player.

ProgressGoalStateAction

A Player State Action that is fired when the Progress value of a Goal is incremented by the GoalProgress value passed to the action. Depending on the TargetProgression of the Goal may, or may not, be complete when the ProgressGoalStateAction is fired.

SetGoalProgressStateAction

Similar to the ProgressGoalStateAction but this action sets the Progress value of a Goal rather than incrementing it.