-
Notifications
You must be signed in to change notification settings - Fork 0
Step 9.01: Example Weapon Guide
URF includes pre-configured example Data Asset classes for each weapon type. These are useful for quick testing because most weapon values are already configured. In many cases, you only need to assign the correct weapon actor class.
This guide also covers the new per-weapon targeting settings, which allow each weapon to define its own target rules.
Content Browser
-> Create
-> Data Asset
-> URFExampleProjectileDataAsset
Pre-configured values:
Weapon Type -> Projectile
Targeting Type -> Nearest Enemy
Damage -> 15
Cooldown -> 1.5
Speed -> 800
Pierce -> 0
Duration -> 3
Recommended use:
Set ActorClass to your projectile actor Blueprint.
Content Browser
-> Create
-> Data Asset
-> URFExampleMeleeDataAsset
Pre-configured values:
Weapon Type -> Melee
Targeting Type -> Area
Damage -> 10
Cooldown -> 999
Area -> 200
Duration -> 0
This style usually spawns once and stays active.
Recommended use:
Set ActorClass to your melee/aura actor Blueprint.
Content Browser
-> Create
-> Data Asset
-> URFExampleAreaDataAsset
Pre-configured values:
Weapon Type -> Area
Targeting Type -> Area
Damage -> 25
Cooldown -> 3
Area -> 150
Duration -> 5
Amount -> 2
Recommended use:
Set ActorClass to your area damage actor Blueprint.
Content Browser
-> Create
-> Data Asset
-> URFExampleOrbitDataAsset
Pre-configured values:
Weapon Type -> Orbit
Targeting Type -> None
Damage -> 20
Cooldown -> 999
Area -> 180
Amount -> 3
This style usually spawns orbiting actors once and keeps them around the player.
Recommended use:
Set ActorClass to your orbit actor Blueprint.
Content Browser
-> Create
-> Data Asset
-> URFExampleBeamDataAsset
Pre-configured values:
Weapon Type -> Beam
Targeting Type -> None
Damage -> 18
Cooldown -> 999
Area -> 800
Speed -> 45
Recommended use:
Set ActorClass to your beam actor Blueprint.
Content Browser
-> Create
-> Data Asset
-> URFExampleSummonDataAsset
Pre-configured values:
Weapon Type -> Summon
Targeting Type -> Nearest Enemy
Damage -> 30
Cooldown -> 8
Duration -> 15
Amount -> 2
Speed -> 400
Recommended use:
Set ActorClass to your summon actor Blueprint.
Content Browser
-> Create
-> Data Asset
-> URFExamplePassiveDataAsset
Pre-configured values:
Weapon Type -> Passive
Targeting Type -> None
Damage -> 0
Cooldown -> 999
Area -> 100
Duration -> 0
Recommended use:
Use this for passive effects or stat-style behavior.
- Right-click in Content Browser
- Select Data Asset
- Choose the desired example data asset class
- Example:
URFExampleMeleeDataAsset - Name it, for example
DA_MyGarlic
- Open the Data Asset
- Find the Actor Class section
- Set
ActorClassto your weapon actor Blueprint - Save
Example:
ActorClass -> BP_MyGarlicActor
Add the Data Asset to your player's URFWeaponComponent.
For quick testing:
Player Blueprint
-> URFWeaponComponent
-> Starting Weapons
-> Add DA_MyGarlic
For level-up selection:
Player Blueprint
-> URFLevelUpSystem
-> Available Weapons Pool
-> Add DA_MyGarlic
Press Play.
Expected result:
Weapon auto-fires or activates
Enemy actors are targeted
Damage is applied
Weapon cooldown and behavior match the Data Asset
Weapons can now override targeting settings individually.
This is useful when different weapons should target different actor types.
Examples:
- A boss-only weapon
- A door-only weapon
- A weapon that only damages enemies with a specific tag
- A weapon that only fires when a valid target exists
In a weapon Data Asset, use the Targeting section.
Override Targeting Settings -> true
When enabled, this weapon uses its own targeting filters instead of only relying on the global weapon component targeting settings.
Targetable Classes
+-- BP_BossEnemy
Use this when the weapon should only target specific actor classes.
Targetable Tags
+-- Boss
Use this when the weapon should only target actors with specific tags.
Target Unspecified Actors -> false
When false, actors that do not match the configured class/tag filters are ignored.
For strict filters such as boss-only or door-only weapons, keep this false.
Only Fire When Target Available -> true
When true, the weapon will not fire unless a valid target exists.
This is useful for weapons that should stay idle until their specific target type is present.
Targeting Range Override -> 0
When set to 0, the weapon uses the global targeting range.
Set a positive value if this weapon should have its own targeting range.
Goal:
Only target Boss actors.
Only damage Boss actors.
Do nothing when no Boss exists.
Ignore normal enemies.
Weapon Data Asset settings:
Override Targeting Settings -> true
Targetable Tags
+-- Boss
Target Unspecified Actors -> false
Only Fire When Target Available -> true
Targeting Range Override -> 0
Boss actor setup:
Actor Tags
+-- Boss
If your boss inherits from AURFTestEnemy, make sure it does not also automatically add the regular Enemy tag unless you want it to be targetable by normal enemy-targeting weapons.
For production enemies using URFEnemyLogicComponent:
Auto Add Enemy Tag -> false
or:
Auto Enemy Tag -> Boss
depending on your desired targeting setup.
Goal:
Only attack doors.
Ignore enemies.
Do not fire unless a door exists.
Weapon Data Asset settings:
Override Targeting Settings -> true
Targetable Tags
+-- Door
Target Unspecified Actors -> false
Only Fire When Target Available -> true
Door actor setup:
Actor Tags
+-- Door
Goal:
Attack regular enemies.
Ignore bosses or special targets unless they also use the Enemy tag.
Weapon Data Asset settings:
Override Targeting Settings -> true
Targetable Tags
+-- Enemy
Target Unspecified Actors -> false
Only Fire When Target Available -> true
Enemy actor setup:
Actor Tags
+-- Enemy
For production enemies using URFEnemyLogicComponent, this is the default behavior:
Auto Add Enemy Tag -> true
Auto Enemy Tag -> Enemy
Scenario:
Boss and minions are around the player.
Normal weapons should target minions.
BossKiller should target only the boss.
BossKiller should not fire if no boss exists.
Minion setup:
Auto Add Enemy Tag -> true
Auto Enemy Tag -> Enemy
Boss setup:
Auto Add Enemy Tag -> false
Actor Tags
+-- Boss
Normal weapon:
Override Targeting Settings -> true
Targetable Tags
+-- Enemy
Target Unspecified Actors -> false
Only Fire When Target Available -> true
BossKiller weapon:
Override Targeting Settings -> true
Targetable Tags
+-- Boss
Target Unspecified Actors -> false
Only Fire When Target Available -> true
Result:
Normal weapons attack minions.
BossKiller attacks the boss.
BossKiller stays idle when no boss exists.
Weapon Type controls what kind of weapon actor or behavior is created.
Examples:
Projectile
Melee
Area
Orbit
Beam
Summon
Passive
Targeting Type controls how the weapon chooses or uses a target.
Examples:
None
Nearest Enemy
Area
Some weapon types do not need an aimed target.
Examples:
Orbit weapons often use Targeting Type -> None
Beam weapons may use Targeting Type -> None
Melee aura weapons may use Targeting Type -> Area
For strict target filtering, use the per-weapon targeting override settings described above.
1. Create URFExampleMeleeDataAsset -> DA_GarlicTest
2. ActorClass -> BP_MyGarlicActor
3. Add DA_GarlicTest to Starting Weapons
4. Press Play
Expected result:
Spawns once and deals continuous area damage.
1. Create URFExampleProjectileDataAsset -> DA_WandTest
2. ActorClass -> BP_MyProjectileActor
3. Add DA_WandTest to Starting Weapons
4. Press Play
Expected result:
Fires projectiles at the nearest valid target.
1. Create URFExampleAreaDataAsset -> DA_WaterTest
2. ActorClass -> BP_MyAreaActor
3. Add DA_WaterTest to Starting Weapons
4. Press Play
Expected result:
Creates area damage zones every few seconds.
Check:
-
URFWeaponComponent -> Auto Fire Enabledis true - The weapon Data Asset is added to Starting Weapons or acquired through level-up
- Cooldown is not extremely high unless the weapon is intended to spawn once
- The weapon has a valid
ActorClassif required - A valid target exists in range
- If
Only Fire When Target Availableis true, the weapon will stay idle until a valid target exists - If per-weapon targeting is enabled, the target actor must match the weapon's class/tag filters
Check:
- Boss actor has the
Bosstag - Weapon has
Override Targeting Settings -> true - Weapon has
Targetable Tags -> Boss Target Unspecified Actors -> false- Boss is within targeting range
-
Only Fire When Target Availableis enabled only if you want the weapon to wait for bosses
Check:
-
Override Targeting Settingsis enabled -
Targetable Tagsonly contains the intended tag -
Target Unspecified Actorsis false - The normal enemy does not also have the special tag
- The weapon actor is receiving the correct damage filter from the weapon component
Check:
- Open the weapon Data Asset
- Find the Actor Class section
- Assign the correct Blueprint actor class
- Save the Data Asset
- Example Data Assets are intended for fast setup and testing.
- For production weapons, duplicate an example Data Asset and tune the values.
- Use per-weapon targeting when different weapons should prefer different target types.
- Use tags such as
Enemy,Boss,Door, orBreakableto create clear targeting rules.