Skip to main content

Quick Start

From install to a firing turret in your own level.

At a glance​

  1. Add the pack to a UE 5.7 project.
  2. Open Maps/L_TurretExample and press Play.
  3. Drag Blueprints/Turret/BP_TurretPawn into your level.
  4. Give your player a team, or leave it without one to be attacked.

All paths on this site are relative to Content/AITurret.

1. Install​

From Fab, add the product to your project through the Epic Games launcher (Library → Add to Project).

You can also migrate it from another project. In its Content Browser, right-click AITurret → Migrate… and pick your project's Content folder.

No project settings are needed. The content does not depend on Config/ files, collision channels or plugins.

2. Play the example map​

Open Maps/L_TurretExample and press Play. Walk towards a turret: it turns to you and fires. See Example Map for the controls.

3. Put a turret in your level​

Drag Blueprints/Turret/BP_TurretPawn (dual barrel) or BP_TurretPawn2 (single barrel) into the level. It brings its AI controller, BP_TurretAIController, and works with the default values.

Spawning turrets at runtime

A placed turret is possessed by its controller automatically. For a turret you spawn at runtime, set Auto Possess AI to Placed in World or Spawned in its Class Defaults.

4. Decide who gets shot​

Every turret has a TeamID (255 = no team). Turrets attack pawns of other teams and pawns without a team, and they ignore everything that is not a pawn.

Your player gets a team through BPI_TeamAgent. The quickest way is the example's Blueprints/Examples/BP_TeamPlayerController: set it as your GameMode's Player Controller Class and set its TeamID. Details: Customization → Teams.

5. Make the shots hurt​

Projectiles deal no damage by default. Override OnProjectileImpact in your turret and call Apply Damage on OtherActor. See Customization → Damage.

Offline documentation​

The pack includes Content/AITurret/Documentation/QUICKSTART.md with the essentials from these pages. It is a plain Markdown file, so open it in Explorer: the Content Browser does not show it.