ReferenceDevices
Abstract Class
Define an abstract base_checkpoint with an overridden OnPassed per subclass.
Updated
abstract_class in ~90 seconds.A runner hits the jungle checkpoint and the ancient pyramid glows green — one shared trigger, but a unique reward for every tier.
An abstract class like base_checkpoint sets the contract, wiring the race_checkpoint_device to a method that subclasses must override.
We declare the abstract OnPassed method, subscribe the device's CheckpointCompletedEvent to it, then let jungle_checkpoint provide the exact logic.
Reach for abstract classes when multiple devices share the same wiring but need their own unique reactions.
base_checkpoint := class<abstract>(creative_device):
@editable
Device : race_checkpoint_device = race_checkpoint_device{}
abstract OnPassed(A: agent): void
OnBegin<override>()<suspends>:void =
Device.CheckpointCompletedEvent.Subscribe(OnPassed)
jungle_checkpoint := class(base_checkpoint):
OnPassed<override>(A: agent): void =
Print("Jungle tier cleared!")
Build your own lesson with abstract_class
Generate a personalized, compile-checked lesson grounded in this exact reference.
Build a lesson →