Skip to main content

Checkpoints

Prefab found at Assets/ULTRAKILL Assets/Prefabs/Levels/ Checkpoint & CheckpointReusable

Checkpoints allow a player to start over an arena or segment, but how does this work internally?

A Checkpoint is given Stuff to clone, and when the player resets to a Checkpoint, it restores what was cloned.

It is also important to know that: if the Checkpoint spits you into the void, you did something wrong!


Basic Usage

Out of the box, Checkpoints need little setup:

  • To Activate - the room object the Checkpoint is for. Think of it as the room object that is enabled if you were to teleport to it through the Teleport Menu cheat.
  • Rooms - a list of Stuff that is cloned when the level loads, saving the default state of Stuff.
  • Rooms To Inherit - a list of Stuff that is cloned when the Checkpoint is grabbed, saving the state of Stuff when it's grabbed.
  • Doors To Unlock - doors that will be unlocked when the player restarts to this Checkpoint. Usually, if an arena locks doors found in Stuff, put those doors here as well, or else you'll get stuck.

If your Checkpoint is non-reusable (one time), put your Stuff in Rooms!

If your Checkpoint is reusable (multi-use), put your Stuff in Rooms To Inherit!

Between Rooms and Rooms To Inherit, you only need to fill one of those in, never both.

note

It is important that you only put Stuff objects (the ones with the GoreZone component) into either Rooms or Rooms To Inherit depending on your use case. Putting other objects without the GoreZone component may cause issues.

In your level hierarchy, Checkpoints should always split between rooms.

  • 1 - MyRoomFirst
  • Checkpoint (would clone Stuff found under MyRoomSecond)
  • 2 - MyRoomSecond

The Checkpoint's local +Z direction is where the player will be facing when respawned.


Troubleshooting

Checkpoints are very tempermental, but here are some pointers if you're having issues!

  • Is your Checkpoint separate from any room in the hierarchy?
  • Is ToActivate filled in?
  • Is there at least 1 Stuff object in either Rooms or RoomsToInherit?
  • Are there not Stuff objects in both Rooms and RoomsToInherit?
    • If there is (and you know what you're doing), are they not the same Stuff?
  • Are there no missing references in either the Rooms or RoomsToInherit lists?

Fields

  • Inherit All Rooms - this treats every GoreZone (Stuff) in the level as if it was under Rooms To Inherit
  • Unlock All Doors - this treats every Door in the level as if it was under Doors To Unlock
  • Doors To Ignore - when unlocking doors with specifically Unlock All Doors set to true, do not unlock these doors
  • Reset On Get Other Checkpoint - if another Checkpoint is grabbed, re-enable this Checkpoint to be grabbable (even if it's non-reusable!)
  • Reset On Distance - using Auto Reset Distance, re-enable this Checkpoint if the player has exceeded that distance
  • Start Off - sets the Checkpoint to a state as if it was grabbed
  • Force Off - overrides all logic of this Checkpoint being able to be re-enabled (Reset On Get Other Checkpoint, Reset On Distance, etc.), and has to be set on manually via SetForceOff(bool state) function
  • Disable During Combat - disallows this Checkpoint to be grabbable if combat is active
  • Unteleportable - remove this Checkpoint from the Teleport Menu cheat list
  • Invisible - hides the pink graphic, but the Checkpoint is still grabbable
  • OnRestart() - a list of UnityEvents to be called when the player resets to this Checkpoint