Article Categories
- Baldur's Gate 3
- Diablo
- Elder Scrolls
- General
- Hogwarts Legacy
- League of Legends
- Minecraft
- Pokemon Go
- Sims 4
- StarCraft
- Steam Platform
- Xbox Game Console
More Articles
How To Spawn after a specific amount of time

I am currently making a Legend of Zelda themed adventure map. I am struggling to make it, so enemies spawn every few minutes but not spawn large amounts over time. I have tried using things like hopper clocks to time when enemies spawn but after a while it turns into a large swarm of unwanted enemies. I am looking to make it so if an enemy has already spawned another will not spawn.
Example: if there are 5 enemies in a room, there will never be more than 5. So even if a few are killed, a few minutes later more will respawn, but no more than 5 in total.
Question from user Opllusion at gaming.stackexchange.com.
Answer:
You can store the result of the execute if entity subcommand to count how many entities there are and then execute based on that.
You will need a dummy scoreboard objective (let's say count) and a fakeplayer to store the amount in (let's say $zombies).
Now we can count the amount of zombies and only summon another one if there are 4 or less zombies in total:.
execute store result score $zombies count if entity @e[type=zombie].
execute if score $zombies count matches ..4 run summon zombie.
Answer from user Plagiatus at gaming.stackexchange.com.

I am currently making a Legend of Zelda themed adventure map. I am struggling to make it, so enemies spawn every few minutes but not spawn large amounts over time. I have tried using things like hopper clocks to time when enemies spawn but after a while it turns into a large swarm of unwanted enemies. I am looking to make it so if an enemy has already spawned another will not spawn.
Example: if there are 5 enemies in a room, there will never be more than 5. So even if a few are killed, a few minutes later more will respawn, but no more than 5 in total.
Question from user Opllusion at gaming.stackexchange.com.
Answer:
You can store the result of the execute if entity subcommand to count how many entities there are and then execute based on that.
You will need a dummy scoreboard objective (let's say count) and a fakeplayer to store the amount in (let's say $zombies).
Now we can count the amount of zombies and only summon another one if there are 4 or less zombies in total:.
execute store result score $zombies count if entity @e[type=zombie].
execute if score $zombies count matches ..4 run summon zombie.
Answer from user Plagiatus at gaming.stackexchange.com.
How to mark items as junk in The Outer Worlds?
How do I reset my sensor to track Shrines in Zelda Tears Of The Kingdom?
The combat has ruined this game for me
Is mephiles the dark shadows long lost brother?
How many chapters are in Nier Reincarnation?
How do you pet Bubba with a controller?
Will the Cursed Swords one-hit death effect apply in Dead Cells?
How do you make Cuphead black and white?
Third Person Mode for Portal - Portal 2
What happens if you play an attack card twice but the targeted enemy dies after its played once?


