Create And/Or Modify a Turret

How to Create and Set Up a New Turret


1. Create Your Turret Blueprint

  • Option 1: Duplicate an existing turret blueprint.

  • Option 2: Create a child blueprint from BP_MasterTurret.


2. Manual Setup vs Data Table Entry

  • Manual: Set all values directly in the turret blueprint (via AC_AutoTurretStats).

  • Data Table: Add it as a new row in DT_TurretList. Great for managing variations like:

    • Regular vs. Barrage Firing

    • Solo vs. Battery Variants

    • (i.e. one blueprint can represent multiple variations)


3. Core Stats via AC_AutoTurretStats

Variable
Description

Turret Name

Used only for DT-linked turrets to find the correct data row.

Health

Durability of the turret.

Search Radius

Distance for target detection.

Damage

Base projectile damage.

Rate of Fire

How often it fires (in seconds).

Projectile Speed

Speed at which projectiles travel.

Max Deviation

Random aim inaccuracy (0 = perfect aim).

Damage Radius

AoE for explosive projectiles only.

Penetration

For non-explosive projectiles (e.g., piercing rounds).

Effective Firing Range

Max projectile travel distance.

Max Pitch

Vertical aiming limit.

Lock Time

Lock-on time for homing missiles.

Max Capacity

Projectile reserves (0 = infinite).

Projectile Type

Actor class of the projectile to spawn.

Targeting Priority

Closest, most health, etc.

Team

Used for faction/team logic.

Requires Clear Sight To Shoot?

Can the turret fire through visibility-blocking objects?

Need LOS For Targeting?

Does it need line of sight to even target?

Can Track Without LOS?

If it can keep tracking after losing visual.

Predict?

Enable leading/predictive aim on moving targets.

Forget Lost Target?

If enabled, turret drops target after timeout.

Battery / Barrage

Controls multi-turret battery behavior or barrage fire mode.

Dynamic Targeting

Will it switch targets if a better one appears?

LookForTargetInterval

Performance tweak: how often it searches.

TimeToAdjustBattery

Time before battery turrets start firing.

Barrage Cooldown

Time between barrages (if barrage = true).

TimeToTargetLost

How long before it forgets a hidden target.

Pitch Correction

Adjust vertical aim for close-range targeting.

ZRotationSpeed

Horizontal tracking speed.

YRotationSpeed

Vertical tracking speed.

Firing Sound

Sound cue triggered on fire.

NiagaraSys / ParticleSys

Muzzle flash VFX (Niagara has priority).


4. Static Mesh Setup

Mesh Component
Role

Base (optional)

Static base mesh, usually unanimated.

Yaw Base

Horizontal rotation (Z axis).

Pitch Base

Vertical rotation (Y axis).

Cannon Base

Muzzle assembly & socket holder.

🔧 Important Setup Notes:

  • Make sure the rotator (parent of Pitch Base) is properly centered at your turret’s pivot for accurate rotation.

  • All firing sockets should be part of Cannon Base. Turret blueprint will auto-scan and populate them. Make sure your don't add sockets that you do not want to be a firing socket.


5. Camera & Laser Placement

  • Move the Spring Arm (used for camera view when possessed) to a desirable position.

  • Reposition the Laser Out (Sphere Collision) to determine where the laser targeting originates.


6. Other Components

🔹 AC_UpgradeComponent

  • Only needed if you support runtime upgrades.

  • Set Base Price and Max Stat Level.

🔹 AC_PoolInfo

  • Only for non-explosive projectiles.

  • Supports: Ballistic 01, Ballistic 02, Laser.

Benefits: Uses object pooling to prevent performance spikes from spawn/destroy.

🧠 How to calculate Pool Size:

ProjectileLifetime = EffectiveRange * 1.1 / ProjectileSpeed
ShotsPerSecond = 60 / RateOfFire / 60
RequiredPoolSize = ProjectileLifetime * ShotsPerSecond

Then:

  • Add ~5% buffer for safety.

  • OR enable AutoPoolSize in AC_PoolInfo to calculate it for you.

📌 Don’t forget:

  • Barrage turrets must factor in BarrageCooldown.

  • Upgradable turrets must calculate based on fastest possible Rate of Fire after upgrades.


And with that, your turret is fully functional, optimized, and ready for combat. 💥

Last updated