> For the complete documentation index, see [llms.txt](https://docs.uci.ucserver.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uci.ucserver.it/uncomplicatedcustomitems/archive/uci-4.0./customflagsettings/itemshot.md).

# ItemShot

{% hint style="danger" %}
This is archived all will not work on the latest version.\
Archived version: 4.0.\*
{% endhint %}

**Description**\
When the firearm is shot it will spawn/launch an item or projectile according to these settings. Useful for thrown-projectile behavior, grenades, or items that are themselves projectiles spawned by weapons or other systems.

**Parameters**

* `is_grenade` — `bool` — If `true`, the projectile is treated as a grenade (explosive behavior may be handled elsewhere). Default: `false`.
* `grenade_explode_on_impact` — `bool` — If `true` the grenade will explode on impact instead of on a timer. Default: `false`.
* `is_custom_item` — `bool` — If `true`, the launched object is a custom item (use `custom_item_id`). If `false`, a built-in `item_type` is used. Default: `false`.
* `velocity` — `float` — Initial forward velocity of the launched projectile (units depend on game physics). Default: `0`.
* `upwards_factor` — `float` — Upward / vertical component multiplier applied to the launch. Default: `0`.
* `torque` — `Vector3` — Angular torque applied to the launched object (affects spin). Default: `Vector3(0,0,0)`.
* `custom_item_id` — `uint` — ID of the custom item to spawn if `is_custom_item` is `true`. Default: `0`.
* `item_type` — [`ItemType`](/uncomplicatedcustomitems/api/enums/external/itemtype.md) — Built-in item type to spawn if `is_custom_item` is `false`. (Use your project’s `ItemType` enum; no default provided in class.)

**Behavior notes**

* If `is_custom_item` is `true`, the `custom_item_id` field must reference a valid custom item ID. If `false`, the engine will use `item_type`.
* `IsGrenade` typically affects collision/explosion logic; ensure your grenade handling code checks `grenade_explode_on_impact` accordingly.
* `Velocity`, `UpwardsFactor`, and `Torque` control physics. Tune them for desired projectile arc and spin.

**Example Yaml context**

```yaml
flag_settings:
  item_shot_settings:
  - is_grenade: true
    grenade_explode_on_impact: true
    is_custom_item: false
    velocity: 25.0
    upwards_factor: 0.2
    torque:
      x: 0
      y: 1
      z: 0
    custom_item_id: 0
    item_type: HEGrenade
```


---

# 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://docs.uci.ucserver.it/uncomplicatedcustomitems/archive/uci-4.0./customflagsettings/itemshot.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.
