How do you Stop Towers from damaging each other?

What would be the easiest way to do this?

I can thinking of 2 solutions, but I don’t know how to implement them.

  1. Do not apply damage if the projectile is launched from a turret and hits a different turret (No Clue how to code that. I’m assuming somehow getting the Owner of the fired projectile and only doing damage if it isnt the same Tower type??? )

  2. Have Projectiles that are launched from turrets ignore collision with other Towers.
    -I feel like this solution is in UE editor, having something to do with tags.

I’ve tried creating two now collision types Ally and Enemy. I duplicated the BP_Projectile and renamed it BP_ProjectileEnemy, set it as the projectile class in tower.

Set the Projectile to ignore collision with “enemy”

But the tower still blocks the shot. No Idea whats going on here. Help

Fixed it, I had the collision type on each Pawn set to Dynamic, bullet now pass through properly that everything is labeled correctly

  1. Would be calling IsA on the Owner and HitActor in the projectile’s on hit. If the Owner and HitActor’s are both towers, don’t deal damage.
1 Like

Thanks Dan, I’ll look into implementing this just for practice :+1:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms