ReferenceVerse

Inheritance

inheritance

Updated Compile verifiedExamples verified on the live UEFN compiler
Watch the Knot — inheritance in ~90 seconds.

Spotted a galleon from the crow's nest—but only the captain can order the attack, and inheritance is what lets them do both.

The captain class inherits the lookout's spyglass skills, then adds its own gold-hunting commands to the blueprint.

We define the base lookout class, then the captain class extends it in parentheses, gaining SpotShip for free while adding OrderAttack.

Reach for inheritance when a new character needs all the old tricks plus a few new ones.

lookout := class:
    var Spotted : logic = false
    SpotShip() : void = set Spotted = true
captain := class(lookout):
    var Gold : int = 0
    OrderAttack() : void = set Gold = Gold + 50
nest_device := class(creative_device):
    OnBegin<override>()<suspends>:void =
        Cap := captain{}
        Cap.SpotShip()
        Cap.OrderAttack()

Build your own lesson with inheritance

Generate a personalized, compile-checked lesson grounded in this exact reference.

Build a lesson →