Create a Projectile Blueprint
Projectiles are Actors spawned by Passives. They travel, collide, deal damage, and optionally apply Buffs.
All projectiles derive from ABaseProjectile.
1. Create the Blueprint
- In the Content Browser, right-click → Blueprint Class.
- Search for
BaseProjectileand select it. - Name it
BP_Proj_<YourName>(e.g.BP_Proj_FireBall). - Save it in
Content/Blueprints/Projectiles/.
2. Components setup
The projectile has three built-in components. Configure them in the Blueprint viewport.
| Component | Purpose | What to set |
|---|---|---|
ProjectileMesh | Visual mesh — no collision | Set your mesh and material here. Disable collision on this component. |
CollisionComponent | Sphere — handles actual hit detection | Enable collision, set Overlap with relevant channels (characters, walls…). |
ProjectileMovementComponent | Handles movement automatically | Adjust InitialSpeed, homing settings here. |
3. Movement
| Property | Category | Description |
|---|---|---|
InitialSpeed | Stats › Movement | Starting speed of the projectile (units/s). Set to 0 if the projectile should stay attached to the owner (bIsParentedToOwner = true on the Passive). |
ProjectileMovementComponentalso hasMaxSpeed,HomingAcceleration, andbIsHomingProjectile— configure directly on the component.
4. Level-based arrays
These arrays follow the same indexing as passives (one entry per level, 5 entries total).
| Property | Category | Description |
|---|---|---|
OnHitDamage | Stats › Damage | Damage per hit. e.g. [10, 15, 20, 25, 30] |
Range | Stats › Destruction | Max travel distance before auto-destroy. Leave empty for infinite range. |
DurationBeforeDestroy | Stats › Destruction | Max lifetime in seconds. Leave empty for no time limit. |
5. Hit behavior
| Property | Category | Description |
|---|---|---|
DestroyOnHit | Stats › Destruction | true = destroyed on first hit. false = passes through. |
SpawnedActorsOnHit | Stats › Destruction | Array of actor classes to spawn at the hit location (per level). |
6. Apply buffs on hit
- Set
ApplyBuffsOnHit = true. - Fill the
OnHitBuffsarray. Each entry is aFBuffArray(array of buff classes) — one per level.
OnHitBuffs[0].Buffs = [BP_Buff_Slow] (level 1)
OnHitBuffs[1].Buffs = [BP_Buff_Slow] (level 2)
OnHitBuffs[2].Buffs = [BP_Buff_Slow, BP_Buff_Poison] (level 3+)
...7. Visual hit effect (Blueprint event)
Override OnHitEffect(OtherActor) in your Blueprint for visual/sound feedback on impact.
Do not handle destruction here — it is managed by C++.
Example Blueprint graph:
Event OnHitEffect(OtherActor)
→ Spawn Emitter at Location (hit location)
→ Play Sound at Location8. Link to a Passive
Once your projectile Blueprint is ready, reference it in the Passive's ProjectileBP array.
See Create a Passive.
Complete example — fire ball
BP_Proj_FireBall
ProjectileMesh = SM_Sphere (no collision)
CollisionComponent radius = 30
InitialSpeed = 1200
OnHitDamage = [15, 20, 25, 30, 40]
Range = [1500, 1500, 2000, 2000, 2500]
DestroyOnHit = true
ApplyBuffsOnHit = true
OnHitBuffs[0..4].Buffs = [BP_Buff_Burn]
OnHitEffect → spawn fire particle