# Resource Handling (Ammo/Heat)

### Ammo

To create limited ammo for projectile weapons and missile weapons:

1. Add a **Resource Container** component to the weapon and customize the inspector settings.
2. Go to the **Weapons** component on your weapon and go to the *Resource Handlers* list in the inspector. Add an entry to the list.
3. Drag the Resource Container you created above into the *Resource Container* field, and set the *Unit Resource Change* to -1 (this will remove 1 from the ammo container when the weapon is fired.

Now, the weapon will deplete the ammo container, and not fire when the ammo is empty.

### Heat

To produce heat when the weapon is fired, repeat the steps for the Ammo section above, but set the *Unit Resource Change* to a positive number in step 3.

You can define different resource types with **Resource Types**, which you can create in the Project tab with *Right Click* > *Create > VSX > Resource Type*.


---

# Agent Instructions: 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:

```
GET https://vsxgames.gitbook.io/universal-vehicle-combat/weapons/resource-handling-ammo-heat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
