> For the complete documentation index, see [llms.txt](https://wiki.thescriptersguild.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.thescriptersguild.com/knowledge/scripting/guides-and-info/spawning-vehicles-via-scriptable-buttons.md).

# Spawning Vehicles via Scriptable Buttons

<figure><img src="/files/kFsqDSFNa3XnlNitRwNU" alt="Cover image"><figcaption></figcaption></figure>

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.

## Constraints of Vehicle Pads

Vehicle pads are classified as [Forge Kit Objects](/forge/forge-basics-and-ui/forge-interface/object-browser/forge-kit-objects.md), 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.

## Spawning Vehicles via Object References

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**](/scripting/nodes/game-mode/spawn-mode-object.md) node. This method allows you to duplicate an existing vehicle instance at a specific position in the level.

### Implementation Workflow

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.

{% hint style="info" %}
This method provides more flexibility than pads, as it allows you to spawn vehicles at arbitrary coordinates or via various custom triggers.
{% endhint %}

***

## Source Data

* Discord thread: [Spawning Vehicles via Scriptable Buttons](https://discord.com/channels/220766496635224065/1534086222018908192/1534086222018908192)

#### <mark style="color:green;">Contributors</mark>

Alex\
Okom


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.thescriptersguild.com/knowledge/scripting/guides-and-info/spawning-vehicles-via-scriptable-buttons.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
