How To Spawn after a specific amount of time

[BACK]
How To Spawn after a specific amount of time
Posted On: January 27, 2023

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.



[BACK]
How To Spawn after a specific amount of time
Posted On: January 27, 2023

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.



[BACK]

Hint needed on last Spirit of Arkham (Arkham Asylum) Hint needed on last Spirit of Arkham (Arkham Asylum)

Posted On: January 31, 2023
I'm trying to find the last Spirit of Arkham in Batman, Arkham Asylum, but I am totally stumped. I have otherwise completed the game 100% (including the challenges) and this seems to be the last thing...[More]


7th attempt at a solo honor run 7th attempt at a solo honor run

Posted On: November 24, 2025
And it worked, I just killed the elder brain with a wood half-elf gloomstalker.Overprepped inventory before climbing up. (Mods for more colors and bags).No companions or hirelings, just sneaking and s...[More]


In Factorio What fuel should I use for my flamethrower turrets? In Factorio What fuel should I use for my flamethrower turrets?

Posted On: May 4, 2023
Version 0.13 adds flamethrower turrets to the game. They can be operated with crude oil, heavy oil or light oil. Does the choice of oil have any impact on their performance? Also, which one is the mor...[More]


How do you hire a Hacker in Game Dev Story? How do you hire a Hacker in Game Dev Story?

Posted On: April 13, 2024
I'm on my second playthrough of Game Dev Story, choosing the Hire option at least twice per game year and varying between "Word of Mouth", "Magazine Ad", and "Online Ad" — never seen a Hacker availa...[More]


Hogwarts Legacy - No makeup - beards? Hogwarts Legacy - No makeup - beards?

Posted On: March 7, 2023
I just realized after beating the game and watching some people play that we don't have makeup or beards! Like aren't we 15-16 years old? Surely we can get a little scruff and put on some blus...[More]


Is it possible to run RollerCoaster Tycoon 2 in windowed mode? Is it possible to run RollerCoaster Tycoon 2 in windowed mode?

Posted On: April 9, 2024
Is it possible to run RollerCoaster Tycoon 2 in windowed mode?I have Windows 7 and the game works, but since my resolution is bigger than the game can handle, I would prefer to play in windowed mode i...[More]


Why can't I catch a Thestral in Hogwarts Legacy? Why can't I catch a Thestral in Hogwarts Legacy?

Posted On: March 5, 2023
I cannot for the life of me seem to catch a thestral. Any tips? Question from user Own_Doctor9472 at HogwartsLegacyGaming at reddit.com. Answer: I just use leviosa and then the nab sack. Neve...[More]


How can I import a custom map into Minecraft? How can I import a custom map into Minecraft?

Posted On: February 10, 2023
I've watched lots of Minecraft videos on YouTube, where they tell you to "extract the Minecraft map", but none of them explain exactly what I need to do to get that map imported into Minecraft, once I...[More]


What happens when you die in Borderlands 2? What happens when you die in Borderlands 2?

Posted On: May 1, 2023
What are the penalties upon death? I know money is lost, but how much? Is it a percentage of money in hand, or is it based on level? Are stats affected? How much progress do you lose? Do you lose any ...[More]


Which game is shown in the Virtual Boy Pro for Nintendo Switch announcement trailer? Which game is shown in the Virtual Boy Pro for Nintendo Switch announcement trailer?

Posted On: April 2, 2024
The recent announcement trailer for the Virtual Boy Pro for Nintendo Switch showcased a game running on the console. It looked like a Legend of Zelda title, with the player character riding a horse ac...[More]