
Weapon Ranged is the base class for weapons like pistol or assault rifle in Weapon Designer. It contains basic features like projectile firing, different firing modes, shooting accuracy and range. There are two child classes named Weapon Ranged Static and Weapon Ranged Skeletal.
The Weapon Ranged Static class should be used for ranged weapons that are static (StaticMeshComponent). They do not need to be animated.
The Weapon Ranged Skeletal class should be used for ranged weapons that are animated (SkeletalMeshComponent). This class adds functions and properties for animating the weapon.
Class Modularity #
Weapon classes are designed to be modular. The Weapon Ranged class contains the functions essential to its operation. Some of these functions can be overridden to meet specific needs. Weapon Modules allow you to add to or modify the weapon’s behavior. Finally, the Weapon Profile lets you modify the weapon’s basic characteristics. You can add or remove modules and change profiles at any time to create the weapon you need for your game.
How to create? #
From the content browser, use the context menu (right-click) to select “Weapon Ranged Static” or “Weapon Ranged Skeletal” from the “Weapon Ranged” sub-category in “Weapon Designer” category.
How to configure? #
- Select a mesh for your weapon. Skeletal Mesh in Weapon Ranged Skeletal or Static Mesh in Weapon Ranged Static.
- Add Weapon Profile. See the documentation on this class for a detailed explanation of the parameters.
- Adjust Projectile Spawn Type.
- Adjust Visual, Sound and Animation.
- Set if weapon should be manipulated by two hands.
- Add weapon modules to customize weapon behavior. See the documentation of this component for a detailed explanation of the parameters.
- Override Activate/Deactivate function if needed.
- Override OnSpawnFireEffect function if you want to generate a new effect associated with firing the weapon. Internally, effects such as muzzle flash and shell ejection are already available.

WEAPON PROFILE #
The Weapon Profile class is a data asset that contains important data regarding the weapon’s characteristics.
SPAWN PROJECTILE #
- Spawn Position Type: Defines the position at which the projectile is instantiated. There are several types available to accommodate all use cases.
- Spawn Direction Type: Define the projectile’s direction when instantiating it. There are several types available to cover all use cases, but you’ll likely use “From Line Trace.”
- Weapon Muzzle Socket Name: If you use “From Socket”, you’ll need to specify the name of the socket to use.
MUZZLE FLASH #
- Enable Muzzle Flash: Whether or not muzzle flash is enabled.
- Muzzle System: Niagara system used for muzzle flash.
- Muzzle Flash Socket Name: Socket used for spawn transform of Niagara system component.
SHELL EJECT #
- Enable Shell Eject: Whether or not shell eject is enabled.
- Shell Eject System: Niagara system used for shell eject.
- Shell Eject Mesh: Mesh used for shell. Please note that this work with only mesh renderer Niagara Emitter.
- Shell Eject Socket Name: Socket used for spawn transform of Shell Eject System component.
CHARACTER ANIMATION #
- Support Character Anim: If enabled, the character must register a function for the On Request To Play Anim event.
- Character Fire Anim: Animation played on character when the weapon fire.
- Character Right Arm Idle Anim: Animation played on character when it is idle with this weapon.
- Left Arm Idle Mirror: If enabled, the right arm idle animation is mirrored for left arm. (A Mirror Table Row for character should be created). Only used for individual arm animation or for left hand as primary hand.
HOMING TARGET #
You can use the Set Homing Target function to make projectiles fly toward the target. You must specify the target actor and the homing strength.
