Skip to main content
Version: Next (dev)

Jump Pad

A pad that launches anything landing on it into the air. This is the clearest small example of the pattern most gameplay scripts follow: an event arrives, you decide whether to act, you send a message to make something happen.

Five nodes.

What you need in the scene

The variable

Add one script variable and tick Expose:

NameTypePurpose
pushforceVec3Launch direction and strength, set per instance in the editor

Exposing it means every jump pad in your level can use this one script with a different force — a gentle hop in the tutorial area, a launch across a chasm later.

The graph

OnMsgTriggerTriggered [exec] -> TriggerStateSwitch [exec]
OnMsgTriggerTriggered [TriggerState] -> TriggerStateSwitch [Value]
OnMsgTriggerTriggered [GameObject] -> SendMsgPhysicsAddForce [GameObject]

TriggerStateSwitch [Activated] -> SendMsgPhysicsAddForce [exec]

GetVariable (pushforce) [Value] -> Multiply [A]
Multiply [Result] -> SendMsgPhysicsAddForce [Force]

Multiply has its B input left unconnected and set to a constant of (1000, 1000, 1000) in the property grid, so the final force is pushforce × 1000. That scaling exists because physics forces are in Newtons and a readable authoring value like (0, 0, 5) would otherwise do almost nothing.

SendMsgPhysicsAddForce is configured with Send Mode: Direct and Delay: 0.

How it works

The trigger fires OnMsgTriggerTriggered whenever something enters or leaves. That one node hands you three things:

  • an execution pulse, so the graph runs,
  • TriggerState, telling you whether this was an entry or an exit,
  • GameObject, the object that touched the trigger.

That third output is the important one. The force must be applied to whatever stepped on the pad, not to the pad itself, so GameObject is wired straight into the message node's target.

TriggerStateSwitch then branches on the state. Only the Activated output is connected, so nothing happens when the object leaves — without this, stepping off the pad would launch you a second time.

Meanwhile the two data nodes read pushforce and scale it. They have no execution pins, so they are evaluated on demand at the moment the message node needs a value.

Adapting it

  • Launch straight up — set pushforce to something like (0, 0, 5). Z is up.
  • Launch along the pad's facing — replace the variable with GetGlobalDirForwards and scale that instead.
  • Only launch the player — add a Branch before the message node and test the incoming object, for example with a tag check.
  • Add a sound or effect — chain another message node after SendMsgPhysicsAddForce on the same execution line.
  • Stop it retriggering instantly — the entry point's coroutine mode is set to Stop Other. Switch to Don't Create New and add a Wait if you need a cooldown.

Source

AbyssPlasma/Abyss/Prefabs/Interactable/VS_JumpPad.plVisualScriptClassAsset

See Also