Enemies are not being spawned more than one

I’m spawning AI by running EQS to find the best location and spawn the AI and run mode is “Single Random Item from 5%” set but when I start the game, only one AI is spawned and that’s it, no more AIs are spawned. What could be the problem.
Here are photos of my Game Mode where I’m running the EQS:

Hi, Event BeginPlay will execute only once, when the game begins. Then you run a EQS query which returns max one item. Then you use that single location and spawn an actor there. So your logic above there will spawn up to one actor when the game begins and won’t do anything ever again.

What did you wanted to have?

1 Like

I wanted to have enemies kept spawning at random locations. It spawns only one enemy when I play the game.

If you want to “constantly” execute something you can either use tick or timer. Tick if you want that something to execute every single frame, timer if you want it to execute every x seconds, but less frequently than every single frame. If you do not need to execute something every single frame, then do not use tick. So in your case I would use timer. Some doc on timer: Using Timers | Unreal Engine Documentation

Then execute your enemy spawn logic in the timer, not from the EventBeginPlay.

1 Like

Thank You