Want to have power up that destroys enemies that are within a designated distance from the player

Hi

New to unreal looking for how to set up something up.

Have a top down built from scratch. Would like to have a Boolean variable called powerup become true when I run through a power up sphere. If I press the attack key, L, I would like all enemies within X distance, a variable I would like to be able change as character levels up, to be destroyed. When the attack key is pressed I want the power up boolean to be set to false. Will need the enemies tracking how far they are from the player.

Could anyone guide me on how to set this up?

Thanks

I’d just attach a sphere component to the player blueprint and have the radius hooked up to a variable. Then on pressing your attack key you check all overlapping actors and if any of them are enemies you destroy them. I bet there are enough tutorials that explain how to do the powerup itself.