Class: OnceTriggers

OnceTriggers

OnceTriggers

new gdjs.OnceTriggers()

OnceTriggers is used to store the status of the conditions "Trigger once", that are used in events to have conditions that are only valid for one frame in a row.

Methods

startNewFrame()

To be called when events begin so that "Trigger once" conditions are properly handled.

triggerOnce(triggerId)

Used by "Trigger once" conditions: return true only if this method was not called with the same identifier during the last frame.

Name Type Description
triggerId

The identifier of the "Trigger once" condition.