Ninja Bear Studio Plugins Help

Weapon Actors

This page provides information about Weapon Actors, which are used to apply or defend damage, in conjunction with the Weapon Manager and Gameplay Abilities.

Class Hierarchy

Weapons are the primary Actor introduced by Ninja Combat, so they are designed to be flexible and extensible.

Weapon Interface

Ninja Combat recognizes weapons via the CombatWeaponInterface. This interface has relevant functions used to identify the weapon and its owner.

Function

Description

GetWeaponOwner

Returns the Actor that owns this weapon.

GetWeaponTags

Returns a container of Gameplay Tags that uniquely identify a weapon.

Default Weapon Actor

You can create your own actors implementing the Weapon Interface, or use the provided Default Weapon Actor (NinjaCombatWeaponActor), which is a valid implementation for both melee and ranged weapons.

You may want to create your own base Weapon Blueprint or C++ class, extending the Default Weapon Actor, including some of your own defaults, such as the mesh type being used in your project and any other common logic that should be shared between all weapon actors.

Creating a melee weapon: the Sword

  1. Create a new Blueprint based on NinjaCombatWeaponActor (or your base Weapon class).

  2. Add a weapon mesh, it can be a Static or Skeletal Mesh Component, depending on your weapon requirements.

  3. Disable the collisions from the weapon mesh (or have that done in your base Weapon class).

  4. In the Class Defaults panel, add a Gameplay Tag that defines this weapon, such as Inventory.Item.Type.Sword.

Creating a defensive weapon: the Shield

  1. Create a new Blueprint based on NinjaCombatWeaponActor (or your base Weapon class).

  2. Add a weapon mesh, it can be a Static or Skeletal Mesh Component, depending on your weapon requirements.

  3. Disable the collisions from the weapon mesh (or have that done in your base Weapon class).

  4. In the Class Defaults panel, add a Gameplay Tag that defines this weapon, such as Inventory.Item.Type.Shield.

Creating a ranged weapon: the Rifle

  1. Create a new Blueprint based on NinjaCombatWeaponActor (or your base Weapon class).

  2. Add a weapon mesh, it can be a Static or Skeletal Mesh Component, depending on your weapon requirements.

  3. Disable the collisions from the weapon mesh (or have that done in your base Weapon class).

  4. In the Class Defaults panel, add a Gameplay Tag that defines this weapon, such as Inventory.Item.Type.Rifle.

Weapon Cosmetics

Weapon and Projectile impacts are internally handled via Gameplay Cues.

Cosmetics Data Table

Weapons and Projectiles have default cosmetics - sounds, particles and camera shakes set directly to them. However, you may want to trigger different effects, based on the Physical Material set to the colliding target.

For that, you can set a Data Table, based on CombatImpactCosmeticsTableRow. This structure has the following columns:

Column

Description

Row Name

Should match the Physical Material asset name (i.e. PA_Flesh).

Particles

Particle effects played for the given surface.

Sound

Sound effects played for the given surface.

Camera Shake

Camera shake played for the given surface.

Cosmetics Component

The Combat Cosmetics Component, included in the base Weapon Actor, handles audio effects, particle effects and camera shakes. This component is also integrated with the Asset Manager, supporting soft references and loading on demand, when applicable.

Inventory Integration

To integrate weapons with an Inventory Manager, they must be converted into Equipment Actors. To learn how to integrate with Ninja Inventory, see the Inventory Integration guide.

Last modified: 04 July 2025