# Advanced Weapon Component – Blueprint-Only, Fully Customizable

[YouTube V1.3.0 Preview](https://youtu.be/zXv5YgUgRpY)

[YouTube Preview](https://www.youtube.com/watch?v=xBYVm6E_P5U&ab_channel=CCRagdollGames)

# Roadmap

These are the changes planned for the product. All buyers will receive them for free.

## Ongoing:

- <s>YouTube presentation video </s><span style="color: rgb(45, 194, 107);">Done</span>
- <s>Product description update </s><span style="color: rgb(45, 194, 107);">Done</span>
- <s>Recoil bug fixing, improvements and modularization<span style="color: rgb(45, 194, 107);"> </span></s><span style="color: rgb(45, 194, 107);">Done</span>

## Future plans:

- Code comments <span style="color: rgb(236, 202, 250);"><sub>(tooltips already present)</sub></span>
- <s>Free demo</s> <span style="color: rgb(45, 194, 107);">Done</span>
- New features 
    - <s>Replication </s><span style="color: rgb(45, 194, 107);">Done</span>
    - Bullet penetration <span style="color: rgb(149, 165, 166);">Not started</span>

# Configuration

<p class="callout info">**/All/Game/WeaponComponent/Data**</p>

### E\_BulletType

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/4lfimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/4lfimage.png)

#### Description

- Enum for type of bullet - i.e. can be hitscan or projectile based

#### Possible values

- **LineTrace** - used for hitscan ("bullet" hit will be instant)
- **Projectile** - used for spawning projectile when shooting

### E\_FireMode

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/rhaimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/rhaimage.png)

#### Description

- Enum for fire mode of the weapon

#### Possible values

- **Semi** - semi automatic - it will shoot one bullet per input pressed
- **Auto** - automatic - it will shoot multiple bullets, one after the other, as long as input is pressed
- **Burst** - burst - it will shoot multiple bullets, all at once, when input is pressed

### E\_SpreadType

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/iAXimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/iAXimage.png)

#### Description

- Enum for bullet spread

#### Possible values

- **Angle** - bullet spread will be based on provided angle(float value) - the spread will be in a cone with that angle as diameter
- **Pattern** - pattern exported from **EUW\_SpreadPattern** tool(shipped with the product) will be used for bullet spread

### E\_BurstType

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/8Ayimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/8Ayimage.png)

#### Description

- Enum for burst - same as the one for bullet spread but will be used only for Burst fire mode

#### Possible values

- See **E\_SpreadType** - it's the same

### S\_WeaponFire

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/image.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/image.png)

#### Description

- General configuration for weapon firing

#### Parameters

- **BulletType** - the type of firing (hitscan or projectile based) (see E\_BulletTypo)
- **ProjectileType** - the class type of the projectile, only used if BulletType = Projectile
- **Mode** - firing mode of the weapon (see E\_FireMode)
- **Rate** - fire rate of the weapon in bullets/second
- **Distance** - distance that the bullet can travel in UE units (cm)
- **BaseDamage** - base damage to apply per bullet hit
- **ApplyDamage** - let the AWC handle the damage application (UE5 damage system) or let user handle it - if false, no damage application will be done
- **DamageType** - type of damage for weapon
- **TraceChannel** - channel to be used for traces when firing (this is also used for projectile based fire, not only for hitscan)
- **SKMeshTag** - tag that is set on the Weapon skeletal mesh - this is needed in order to find the **MuzzleSocket**
- **MuzzleSocket** - the muzzle socket on the Weapon skeletal mesh - basically, it's the starting position of the bullet

### S\_SpreadAngle

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/c7mimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/c7mimage.png)

#### Description

- Used for weapon spread - only if SpreadType == Angle (see E\_SpreadType)

#### Parameters

- **AngleDegrees** - the angle in degrees for the cone in which the bullets will spawn

### S\_SpreadPattern

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/9R0image.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/9R0image.png)

#### Description

- Used for weapon spread - only if SpreadType == Pattern(see E\_SpreadType)

#### Parameters

- **Bullets** - spread pattern generated by **EUW\_SpreadPattern** tool
- **SpreadMultiplier** - the spread pattern is normalized and this is used for how much spread to apply - can be changed for more/less spread per bullet

### S\_WeaponSpread

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/CCFimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/CCFimage.png)

#### Description

- Weapon spread settings - uses E\_SpreadType, S\_BurstSpreadAngle and S\_SpreadPattern

#### Parameters

- **SpreadType** - how to calculate the spread (angle or pattern)
- **Angle** - if SpreadType == Angle, see S\_BurstSpreadAngle
- **Pattern** - if SpreadType == Pattern, see S\_BurstPattern

### S\_WeaponRecoil

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/jSAimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/jSAimage.png)

#### Description

- Settings for weapon recoil

#### Parameters

- **UseRecoil** - controls whether recoil to be applied or not(if false, other settings do not matter)
- **SprayBuffer** - buffer of time for each shot in order to be considered spraying - i.e. if fire rate is 3 and buffer is 0.5 it means that if the weapon is shot faster than 0.33s(3 bullets/sec) + 0.5s, it is spraying
- **RecoilOffsets** - recoil to be applied/bullet as a curve (x and y -&gt; pitch and yaw offsets, time is the actual bullet index, z is not used)
- **RecoilOffsetsMultiplier** - multiplier for RecoilOffsets
- **RecoilSpeed** - how fast to apply the recoil
- **RecoilSpeedMultiplier** - multiplier for RecoilSpeed
- **RecoilDecaySpeed** - how fast to decay recoil
- **RecoilDecaySpeedMultiplier** - multiplier for RecoilDecaySpeed

### S\_BurstSpreadAngle

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/SAIimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/SAIimage.png)

#### Description

- Settings for BurstMode when Type == Angle

#### Parameters

- **Count** - number of bullets to be shot
- **AngleDegrees** - bullet spread will be based on provided angle(float value) - the spread will be in a cone with that angle as diameter

### S\_WeaponBurst

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/uPQimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/uPQimage.png)

#### Description

- Settings for Burst Mode (only used when E\_FireMode == Burst)

#### Parameters

- **Type** - type to use for weapon burst, either angle or pattern
- **Angle** - only used if Type == Angle
- **Pattern** - only used if Type == Pattern

### S\_WeaponAmmo

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/NOlimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/NOlimage.png)

#### Description

- Simple settings for Ammo logic

#### Parameters

- **MagazineAmmo** - how many bullets there are per magazine
- **TotalAmmo** - how many bullets does the gun have - this is without what is in the magazine

### S\_WeaponFX

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/qbPimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/qbPimage.png)

#### Description

- Configuration for montages and camera shake effects - sfx and vfx can be applied directly from montages or by using OnBulletHit/OnBulletShot/OnWeaponFired events

#### Parameters

- **FireMontage** - montage to be played on the character when StartShooting event is called, as long as there is ammo in the magazine
- **DryFireMontage** - montage to be played on the character when StartShooting event is called, but there's no ammo in the magazine
- **WeapFireMontage** - montage to be played on the weapon when StartShooting event is called
- **ReloadeMontage** - montage to be played on the character when Reload event is called
- **WeapReloadMontage** - montage to be played on the weapon when Reload event is called
- **CameraShake** - camera shake effect to be played when shooting
- **CameraShakeScale** - scale of the previosly mentioned CameraShake effect

### S\_WeaponData

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/ax4image.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/ax4image.png)

#### Description

- Configuration for the weapon. This aggregates all the previously mentioned data types. This is needed per weapon to configure everything.

# Events

### OnBulletHit

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/i6Uimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/i6Uimage.png)

#### Description

- Called when a bullet hits something
- Can be used to apply damage, spawn decals etc

#### Arguments

- **Hit** - the HitResult structure

### OnBulletShot

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/ODEimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/ODEimage.png)

#### Description

- Called when a bullet spawns (or the line trace is fired)
- Can be used for playing sounds, niagara fx and others.

#### Arguments

- **StartLocation** - the location where the bullet has spawned (i.e. the muzzle socket position)
- **Hit** - HitResult of the actual trace
- **Success** - if the trace hit something or not

### OnMagazineEmpty

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/ijuimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/ijuimage.png)

#### Description

- Called when there are no more bullets in the current magazine

### OnOutOfAmmo

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/0H6image.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/0H6image.png)

#### Description

- Called when there are no more bullets

### OnWeaponFired

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/scaled-1680-/bIhimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-08/bIhimage.png)

### Description

- Called when the weapon is fired (not per bullet - i.e. on burst, will be called once even if the burst has more bullets)

# Projectile

The Projectile Actor used for the Advanced Weapon Component is BP\_WeaponProjectile.

It is a simple Projectile type Actor that only has two important updates:

1. Calls BulletHit event from AC\_AdvancedWeaponComponent when Hit event occurs
2. Uses custom collision settings: object type is Destructible and response to Destructible is "Ignore" 
    - this setup is done in order for burst to work accordingly when using projectiles - projectile should not collide with each other

`Any custom Projectile can be used as long as it calls BulletHit when Hit event occurs and uses object type that does not respond to itself. Aside from that, the type of "ProjectileType" variable in "S_WeaponFire" should be changed from "BP_WeaponProjectile" to custom provided Projectile type.`

# Known Bugs

## Recoil

1. <s>Decay recoil overshoots</s> <span style="color: rgb(45, 194, 107);">Done</span>
2. <s>Decay recoil speed timeline is not used - it has linear decay </s><span style="color: rgb(45, 194, 107);">Done</span>

## General Shooting

1. <s>Shooting spread is not reset if no recoil applied</s> <span style="color: rgb(45, 194, 107);">Done</span>
2. <s>In example, effects are not shown if the bullets do not hit</s> <span style="color: rgb(45, 194, 107);">Done</span>