Skip to main content

Validators

Validators are used by the game developer to customize the internal logic of ChainLink by providing a place for game-specific logic. For example, Validators are used to customize the activation logic of Triggers. To register/define a Validator, see the configuration page.

A Validator is a function that passes in a subject of a specific type (depends on the Validator) and returns a boolean. For example, defining a given Validator in the configuration table could look like something along these lines:

ValidatorName = function(subject)
return -- Insert conditional logic
end

Available Validators

Only Validators from the table below are able to be registered:

NameSubject TypePurposeExample Use Case
CanTriggernilReturns true if any Trigger is able to activateDisabling all Triggers during a cutscene
CanTriggerPlayerPlayerReturns true if the player can activate TriggersMaking Triggers ignore dead players