How to spawn +1 enemy every time I trigger a button

Hi everyone!

I’m new to Unreal and Blueprints and I got stuck with spawning +1 enemy every time I trigger a button.

Below you can see the blueprint script which spawns an enemy every time the ShootRespond trigger is acivated by either walking over it or shooting it. I want the amount of enemies to grow by +1 each time I trigger ShootRespond by either shooting or walking over it. So, I press the button one time it triggers one enemy. The second time it triggers two enemies, etc. I’ve been looking into this matter and it seems I have to create a value of sorts to store the number 1 and then make the blueprint grow that amount by +1 every trigger.

I’m not sure how to do this. Help would be greatly appreciated!

Create an integer, then after each trigger increase it by one and do for loop from 1 to your variable and spawn enemy. By the way, if you call your event again while delay is counting, it would bt ignored. Be careful.