Spawning Vehicles via Scriptable Buttons
Learn how to use object references and the Spawn Mode Object node to spawn vehicles via scripts, bypassing the limitations of vehicle pads.
Last updated
Learn how to use object references and the Spawn Mode Object node to spawn vehicles via scripts, bypassing the limitations of vehicle pads.

When designing game modes that use button-triggered vehicle spawns, developers may encounter difficulties attempting to reference vehicle pads directly within a script brain. This article outlines why this approach is restricted and provides an alternative method for spawning vehicles using object references.
Vehicle pads are classified as Forge Kit Objects, which means they cannot be referenced within a script brain. Furthermore, even if a reference to a pad could be established in a script, the internal spawning logic of those pads is not accessible via scripting to trigger spawns on command.
The recommended approach for triggering vehicle spawns—such as through a Scriptable Button press—is to use direct vehicle object references combined with the Spawn Mode Object node. This method allows you to duplicate an existing vehicle instance at a specific position in the level.
To implement this setup, follow these steps:
Place the desired vehicle (such as a Wasp) on the map and create a reference for that object within your script.
Place a Spawn Mode Object node and feed the vehicle object reference into the node along with a position where the new vehicle instance should be created.
This method provides more flexibility than pads, as it allows you to spawn vehicles at arbitrary coordinates or via various custom triggers.
Discord thread: Spawning Vehicles via Scriptable Buttons
Alex Okom
Last updated