> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/main-components/weapon-manager/mshooteable.md).

# MShooteable

## Overview

This component allows firing projectiles from a weapon.

<figure><img src="/files/E5rkcgXPnHi1gS734PN4" alt="" width="536"><figcaption></figcaption></figure>

## Requirements

Here are the main steps you need to set up a shootable weapon properly.

..........(Incomplete)

### Mode and Abilities

The Weapon mode will be set by the [**Weapon ID**](https://malbersanimations.gitbook.io/animal-controller/main-components/weapon-manager/mweapon-general-properties#weapon-data)

<figure><img src="/files/E4xWXclyN0qMdQDu9yAQ" alt="" width="375"><figcaption></figcaption></figure>

Every shootable weapon needs at least Aim, Reload, and Fire animations. Those need to be set on the Mode Abilities and the Animator Controller.

<figure><img src="/files/IBRY1JqVnBrMimaJZSL1" alt="" width="375"><figcaption></figcaption></figure>

* **Fire Ability: 101**
* **Aim Ability: 97**
* **Reload Ability: 96**

<figure><img src="/files/7v1sFckiuAOAIv3lXs8E" alt="" width="493"><figcaption><p>Rifle Mode (ID: 301) and its 3 Abilities</p></figcaption></figure>

### Animations and Animator

The Animations for the Weapons are set on the Layer Upper Body. This allows them to move around, walk, run, crouch, jump, etc, and use the shootable weapon only on the upper body.

<figure><img src="/files/uY5okENoNPUVmJ0mOJyj" alt=""><figcaption></figcaption></figure>

All the Animations have a duplicated version just in case the weapon needs to be used on the opposite hand:

<figure><img src="/files/CgntXZKs4Qq1iSxznzkY" alt=""><figcaption><p>Rifle Aim Right Hand and Rifle Aim Left Hand use the same condition transitions, but the Parameter Left Hand is different. (True or False)</p></figcaption></figure>

{% hint style="info" %}
Fire and Reload animations are optional. They can be skipped if **\[Has Fire Anim]** and \[**Has Reload Anim]** are set to false.
{% endhint %}

### Animation Curves

All the animations involved with aiming must have the IKAim Curve. This will allow to activate the IK aiming system for the weapons

<figure><img src="/files/6JaQrOyxctrc7zElkXUF" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/jNBlxkQZ3dPP30fHGBzZ" alt=""><figcaption><p>The animation will set the Aim IK Weight to this value (1) while that animation is playing</p></figcaption></figure>

### Projectile

The Shootable weapon needs a Projectile to release. You need to set a gameobject with the MProjectile component in the Projectile parameter

***

## Shootable Parameters

<figure><img src="/files/TzhGR69F3q1EVfCscicQ" alt="" width="500"><figcaption></figcaption></figure>

### Rate

The time delay between attacks. Once a weapon has attacked or released a projectile. it will wait until this time to release the next attack

<figure><img src="/files/Nbr64xtPs1lcTmKQdjh0" alt="" width="563"><figcaption></figcaption></figure>

### Automatic

Continues to attack if the Main Input is still pressed down.

### Charge time

Weapons can be charged before releasing the attack. E.g. The bow can bend to fire the arrow.

{% hint style="warning" %}
Charge Mechanic is only activated if the Projectile is set to Release on **Attack Released**
{% endhint %}

<figure><img src="/files/Rq1OlZptOK2QIIZXWQpq" alt="" width="509"><figcaption></figcaption></figure>

### Charge time Curve

Evaluate the Charge value in the Curve

<figure><img src="/files/bvH5cUSU6VfluwtRa4vu" alt="" width="563"><figcaption></figcaption></figure>

### Max Charge

The max value of the charge that goes from 0 to this value. This value is sent to the Animator for the BlendTree of Charge animations

<figure><img src="/files/Ztqi994EiSqrAW42ZXix" alt=""><figcaption></figcaption></figure>

### Charge Character Multiplier (CM)

Charge multiplier to Apply to the Character Charge Value (For the Animator Parameter)

***

<figure><img src="/files/z4sV4Dil9wA6JXbPDL4F" alt="" width="492"><figcaption></figcaption></figure>

### Aim Origin

If the projectile is equipped before the attack is released. it will be parented to this Transform. E.g. The arrow is parented to the string before it is released.

### Aim Action

Sets the way the weapon will handle the Aiming mechanic

<figure><img src="/files/Q2cMbdjEruHSC2sBaKOK" alt="" width="341"><figcaption></figcaption></figure>

* **Manual**: The Weapon after is equipped it need to enable the Aiming State via Input
* **Automatic**: As soon as the Weapon is equipped it will enter the Aiming State. Firing a projectile will also activate the aiming state
* **Ignore**: Firing projectiles does not require aiming.

{% embed url="<https://streamable.com/pcerin>" %}

### Aim Side

This dictates the position the Aim Profile Camera is going to be placed, In the left or Right side of the shoulder.

### Aim Limit

The weapon will limit firing a projectile if the Angle formed between the Fire Direction and the Forward Direction of the Character. Usually, this is only applied when the character is not strafing or when is mounting the horse. E.g. The Bow cannot shoot arrows in a certain angle due to the harsh position .

The angle is dictated by the Aim Component Aim Horizontal parameter.

<figure><img src="/files/pWJSimRrZNmO0fIXoQc7" alt="" width="563"><figcaption><p>From 90 to 180 the aim is disabled</p></figcaption></figure>

### Use Aim Angle

Adds an extra angle in the Up Direction to fire the projectile. It creates a parabole trajectory.

### Unequip On Aim

By Default if the weapon is aiming, it cannot be unequipped. Enable this parameter to interrupt the Aim and Unequip the weapon.

***

<figure><img src="/files/OcYq1KxGNiK7YhQgHmiL" alt="" width="498"><figcaption></figcaption></figure>

### Has Fire Anim

When set to true, the Character will call the Fire Ability (x**101**) on the mode.

<figure><img src="/files/LlE8dzmVPaiRaLMYWq92" alt=""><figcaption></figcaption></figure>

### Equip Projectile

Set when the projectile is going to be equipped.

<figure><img src="/files/USR0kn9N1K935MmkHogQ" alt=""><figcaption></figcaption></figure>

You can set multiple options but the projectile will be equipped on the first action. All other actions will be ignored.

### Release Projectile

Sets when the projectile is going to be released.

<figure><img src="/files/a8SnggyDTKZSJ4zzzSKb" alt=""><figcaption></figcaption></figure>

* **Never**: The projectile will be not released by me. (This is used when Invector weapons are the ones firing the projectiles)
* **On Attack Start:** The projectile is released as soon as the Attack Input is pressed
* **On Attack Released:** The projectile is released after Attack Input is released. ⭐<mark style="color:green;">**This Option enables the Charge Weapon Mechanic**</mark>

### Release by Animation

The projectile is released by an animation Message. You will need to add a Weapon Behavior Directly to the animation.

<figure><img src="/files/OSdc7cihyFBZvzNvdjsz" alt="" width="563"><figcaption><p>Throwables have a Fire Projectile Message attached to the animation itself</p></figcaption></figure>

### Release Delay

If Release by animation is disabled. The projectile release will be delayed by this value

### Projectile

Prefab of the actual projectile to shoot.

### Projectile Parent

Transform that the projectile will be parented to.

***

<figure><img src="/files/kN2TuQGw8X7FCYQPSrx8" alt="" width="492"><figcaption></figcaption></figure>

### Min and Max Force

Force to release the projectile. If the Charge mechanic is active the force will be influenced by the Charge normalized value.

### Force Mode

Force type applied to the Projectile rigid body.

### Gravity

Gravity transferred to the projectile. Set it to Vector3.zero if you want the projectile to travel with no gravity influence.

***

<figure><img src="/files/bKquGxr57kU1jhTwet5Q" alt="" width="495"><figcaption></figcaption></figure>

### No Reload

Ignores completely the reload mechanic. The weapon will never run out of ammo

### Has Reload Anim

The Weapon uses a reload animation to complete the reload mechanic. The Character will call the Reload Abilty (x**096**) on the mode.

### Reload Time

Time elapsed since the reload action and animation were called, and the actual Reload logic where the ammo is updated.

<figure><img src="/files/m45z1pbUJ01WVbQDnVeB" alt="" width="563"><figcaption><p>The ammo updates 2 seconds after the reload animation is playing</p></figcaption></figure>

### Auto Reload

When true, the reload logic will be called when there's no ammo in the chamber

### Chamber Size

Weapon chamber capacity. E.g. a Pistol can shoot 8 bullets without having to reload. Riffle can shoot 30 bullets without having to reload.

### Ammo In Chamber

Current projectiles in the chamber. When this value is set to zero, you cannot fire any projectiles until you reload again

### **Total Ammo**

The total amount of projectiles the weapon has available

***

## General Parameters

General Parameters are shared between all Weapons. Check all parameters [**here**](/animal-controller/main-components/weapon-manager/mweapon-general-properties.md)**.**

## Damage Parameters

Damage Parameters are shared between all Weapons. Check all parameters [**here**](/animal-controller/main-components/weapon-manager/mweapon-damage-properties.md)**.**

## IK Parameters

IK Parameters are shared between all Weapons. Check all parameters [**here**](/animal-controller/main-components/weapon-manager/mweapon-ik-properties.md)**.**

## Extra Parameters

***


---

# 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://malbersanimations.gitbook.io/animal-controller/main-components/weapon-manager/mshooteable.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.
