Overview | Videos | Documentation | Demos | Integrations | API | Support

Doc Home > Items > Shootable Weapon

The ShootableWeapon component inherits from the Weapon component and allows the weapon to be shot. The ShootableWeapon doesn’t have to be used with just bullets, it can be used with anything that is shot. This includes rockets, bow and arrows, pumpkins, etc. ShootableWeapons have many parameters and can keep firing until the trigger is released or are out of ammo. The ShootableWeapon works with the Inventory to determine how much ammo it has.

When the ShootableWeapon is fired it can either fire a projectile or do a hitscan fire (a raycast). If a hitscan fire is used then the weapon will use the HitscanDamageAmount and HitscanImpactForce to determine how much to damage the object and how much force to apply. Hitscans can also spawn decals, dust, sparks, and an impact sound. If the ShootableWeapon fires a Projectile then the projectile applies the damage and force.

If the ShootableWeapon is fired continuously and Overheat is enabled then the ShootableWeapon will overheat for a duration of CooldownDuration. During this time the ShootableWeapon cannot be fired.

In addition, when the weapon is fired it can optionally spawn a Shell, MuzzleFlash, Smoke, and make a sound. When the weapon is out of ammo it will AutoReload if the option is enabled.

ShootableWeapon Items can optionally add the flashlight or laser sight attachments.

Fire Point
The point at which to do the actual firing

Fire Mode
The mode in which the weapon fires multiple shots. Options include SemiAuto, FullAuto, and Burst

Fire Rate
The number of shots per second

Burst Rate
If using the Burst FireMode, specifies the number of bursts the weapon can fire

Fire Range
The distance in which the bullet can hit. This is only used for weapons that do not have a projectile

Clip Size
The number of rounds in the clip

Fire Count
The number of rounds to fire in a single shot

Fire Type
Specifies how the weapon should be fired

Fire On Used Event
Should the weapon wait to fire until the used event?

Wait For End Use Event
Should the weapon wait for the OnAnimatorItemEndUse to return to a non-use state?

Use Scope
Does the weapon use a scope UI?

Auto Reload
Should the weapon reload automatically once it is out of ammo?

Recoil Amount
The amount of recoil to apply when the weapon is fired

Spread
The random spread of the bullets once they are fired

Regenerate Rate
The speed at which to regenerate the ammo

Regenerate Amount
The amount of ammo to add each regenerative tick. RegenerativeRate must be greater than 0

Idle Animation State Name
The name of the state to play when idle. The Animator component must exist on the item GameObject

Fire Animation State Name
The name of the state to play when firing. The Animator component must exist on the item GameObject

Reload Animation State Name
The name of the state to play when reloading. The Animator component must exist on the item GameObject

Shell
Optionally specify a shell that should be spawned when the weapon is fired

Shell Location
If Shell is specified, the location is the position and rotation that the shell spawns at

Shell Force
If Shell is specified, the force is the amount of force applied to the shell when it spawns

Shell Torque
If Shell is specified, the force is the amount of torque applied to the shell when it spawns

Muzzle Flash
Optionally specify a muzzle flash that should appear when the weapon is fired

Muzzle Flash Location
If Muzzle Flash is specified, the location is the position and rotation that the muzzle flash spawns at

Smoke
Optionally specify any smoke that should appear when the weapon is fired

Smoke Location
If Smoke is specified, the location is the position and rotation that the smoke spawns at

Particles
Optionally specify a sound that should play when the weapon is fired

Fire Sound
Optionally specify any particles that should play when the weapon is fired

Fire Sound Delay
If Fire Sound is specified, play the sound after the specified delay

Empty Fire Sound
Optionally specify a sound that should play when the weapon is fired and out of ammo

Reload Sound
Optionally specify a sound that should randomly play when the weapon is reloaded

Projectile
Optionally specify a projectile that the weapon should use

Projectile Always Visible
Should the projectile always be visible? This only applies to weapons that have a projectile

Projectile Rest Location
If a projectile and always visible is enabled, the location is the position and rotation that the rest projectile spawns at

Projectile Rest Parent
If a projectile and always visible is enabled, the parent is the GameObject that should be the parent of the projectile

Hitscan Impact Layers
A LayerMask of the layers that can be hit when fired at. This only applies to weapons that do not have a projectile

Hitscan Damage Event
Optionally specify an event to send when the hitscan fire hits a target

Hitscan Damage Amount
The amount of damage done to the object hit. This only applies to weapons that do not have a projectile

Hitsscan Impact Force
How much force is applied to the object hit. This only applies to weapons that do not have a projectile

Default Hitscan Decal
Optionally specify a decal that should be applied to the object hit. This only applies to weapons that do not have a projectile and only used if no per-object sound is setup in the ObjectManager

Default Hitscan Dust
Optionally specify any dust that should appear on top of the object hit. This only applies to weapons that do not have a projectile and only used if no per-object sound is setup in the ObjectManager

Default Hitscan Spark
Optionally specify any sparks that should appear on top of the object hit. This only applies to weapons that do not have a projectile and only used if no per-object sound is setup in the ObjectManager

Default Hitscan Impact Sound
Optionally specify an impact sound that should play at the point of the object hit. This only applies to weapons that do not have a projectile and only used if no per-object sound is setup in the ObjectManager

Tracer
Optionally specify a tracer that should should appear when the hitscan weapon is fired

Tracer Location
If Tracer is specified, the location is the position and rotation that the tracer spawns at

Overheat
Should the weapon overheat after firing too many shots?

Overheat Shot Count
The number of shots it takes for the weapon to overheat

Cooldown Duration
The time it takes for the weapon to cooldown after overheating

Flashlight
Optionally specify a flashlight that should shine in the direction of the target

Activate Flashlight On Aim
If the flashlight GameObject is specified, should the flashlight automatically activate when aim or should it manually be toggled?

Laser Sight
Optionally specify a laser sight that should point at the target

Activate Laser Sight On Aim
If the laser sight GameObject is specified, should the laser sight automatically activate when aim or should it manually be toggled?

Disable Crosshairs When Laser Sight Active
If the laser sight GameObject is specified, should the crosshairs be disabled when the laser sight is active?


<- Items
Magic Item ->