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 do I make mobs slowly respawn up to a certain cap?

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.
Does XBox gamepad emulator software exist for the PC?
What does the moon icon on a challenge mean?
How can I track how many mobs are alive?
In Path of Exile, Whats the intended purpose of the Book of Regression?
I am currently missing 6 conjuration pages
Can the Japanese version be played in English?
How do Dragoon and Daybreak pieces work in Team Battles?
Are there any special rewards for completing Adventure Mode multiple times?
Are the quiz answers included in Return To Monkey Island?



