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]

Is it possible to max out both health and stamina in ToTK? Is it possible to max out both health and stamina in ToTK?

Posted On: May 16, 2023
In Breath of the Wild, there were only enough Spirit Orbs to obtain max health or max stamina, but you couldn't max out both (without using buffs that is). During the intro sequence of Tears of th...[More]


How to connect storage items with stills? How to connect storage items with stills?

Posted On: January 17, 2023
I'm pretty new to dwarf fortress, so sorry if this question doesn't make sense. I've been trying to use a still, but most of the options are unavailable because it needs an empty storage i...[More]


How do Zonaite and Zonai-based materials work together? How do Zonaite and Zonai-based materials work together?

Posted On: June 15, 2023
I am very confused about Zonai-based materials and how they work together to produce bigger/larger things. Specifically:. Zonaite. Zonai Charges. Energy Cells. Zonai Devices. Autobuild ...[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]


Do you consider saving Shadowheart parents a good choice? Do you consider saving Shadowheart parents a good choice?

Posted On: November 3, 2023
On my first playthrough, I killed them because it seemed like the best choice. I'm on my second playthrough now and this time, I choose to romance Shadowheart. I'm at that point where I need t...[More]


BG3 Mod Path to Menzoberranzan demo aims for Nautiloid size BG3 Mod Path to Menzoberranzan demo aims for Nautiloid size

Posted On: March 23, 2026
Question from user Wargulf at BaldursGate3 at reddit.com.Answer:This looks so cool .Answer from user Snoo-28829 at BaldursGate3 at reddit.com....[More]


Can anyone explain how time works in this game? Can anyone explain how time works in this game?

Posted On: November 16, 2023
So I had an issue early on that's kinda ruined my experience. When I found the gith woman locked in the cage, I talked the tieflings into moving, but then I couldn't figure out how to target t...[More]


Can't find the last conjuration in Hogwarts Legacy??? Can't find the last conjuration in Hogwarts Legacy???

Posted On: April 18, 2023
So I have been spending hours and hour to get the platinum achievement on PS5. Now I only miss the last achievement (Collectors edition).I have checked all the butterflie locations, all caves and e...[More]


What does the yellow exclamation point above my head mean? What does the yellow exclamation point above my head mean?

Posted On: November 4, 2023
Sometimes when an enemy attacks during combat a yellow exclamation point appears above my head. It only appears for some attacks. What does the yellow exclamation point mean? Question from user Ste...[More]


Is there an advantage to playing Waluigi? Is there an advantage to playing Waluigi?

Posted On: March 7, 2024
I always found weird that it seems most people that are high ranking in Mario Kart 8 plays Waluigi.Always tought that for some reason, most tryhards just gravitate towards that character, but seeing t...[More]