Logic Entity Save Support

LogicBranch

Holds a boolean value and fires one of two outputs depending on whether it is true or false.

Inputs

Name Parameter Description
SetValue Bool (0 or 1) Sets the internal value directly. Pass 1 for true, 0 for false. Other strings are ignored.
ToggleValue Flips the internal value. If it was true it becomes false, and vice versa. Takes no parameter.
Test Evaluates the current value and fires either OnTrue or OnFalse. Does not change the value.

Outputs

Name Pass Variables Description
OnTrue Fires when Test is called and the internal value is true.
OnFalse Fires when Test is called and the internal value is false.

Universal Inputs

These inputs are available on every entity in the engine, not just this one.

Name Parameter Description
GetValue String Reads the named exposed value from this entity and injects it into the pass variable pool. See Advanced Outputs for details.
AddVelocity x,y,z Adds the given vector to the entity's current velocity.
SetVelocity x,y,z Sets the entity's velocity to the given vector, discarding any current velocity.
SetPosition x,y,z Teleports the entity to the given world position.
SetScale x,y,z Sets the entity's scale.
SetRotation x,y,z Sets the entity's rotation from Euler angles in degrees.
AddImpulse x,y,z Applies an instantaneous physics impulse to the entity.
Destroy Despawns this entity on the next frame.

Notes

LogicBranch is the most fundamental building block for conditional map logic. It answers one question: is this thing true right now?

The value starts as false on map load. It persists across saves; a branch set to true before a save will still be true after loading. This makes it the right tool for tracking one-time events like “has the player been in this room before” or “has this puzzle already been solved”.

A common pattern is to call Test from multiple places and let the branch decide what happens. For example, a door lever might call Test on a branch every time it’s pulled. If the branch is false the door opens and the branch is set to true. If the branch is already true nothing happens, making the lever a one-time action.

ToggleValue is useful for alternating states.

Note that SetValue reads only the first character of the parameter string, so passing 1 sets true and 0 sets false. Passing a pass variable like !some_flag will work correctly as long as the variable’s value reads 0 or 1.