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]

Can a redstone latch in Minecraft Java Edition be supplemented with a toggle function? Can a redstone latch in Minecraft Java Edition be supplemented with a toggle function?

Posted On: April 3, 2023
SR latches and T-flip-flops are trivial circuitry in Minecraft redstone, but it appears that there is little to be found for a circuit that combines both, allowing for both SR and T functionality. ...[More]


How can I recognize wanted criminals in Godlike Burger? How can I recognize wanted criminals in Godlike Burger?

Posted On: October 17, 2023
There's this event in Godlike Burger where your restaurant may sometimes be visited by wanted criminals that you can kill for a money reward. Problem is, I don't see any distinguishable marks ...[More]


For Hogwarts Legacy Should I Use PS4 or Switch? For Hogwarts Legacy Should I Use PS4 or Switch?

Posted On: April 15, 2023
So I've been waiting for this game for ages, and I really want to play it. I have a PS4 and a Switch, and I was thinking of getting the Switch version once it comes out, because honestly it's ...[More]


How to get VALORANT on 2021 M1 MacBook Air How to get VALORANT on 2021 M1 MacBook Air

Posted On: March 27, 2024
VALORANT, currently, is not on MacOS. It is also not on Steam. You cannot download VALORANT through the website because. well, there's no button to do so. So how do you get it on Mac?Originally, I tho...[More]


In Dantes Inferno, What gameplay differences are there between the Holy and Unholy tree? In Dantes Inferno, What gameplay differences are there between the Holy and Unholy tree?

Posted On: March 25, 2023
I just started playing this game, and I'm wondering what differences there are in gameplay between the Holy and Unholy trees. Does either tree have powers that are unique in functionality to each ...[More]


What’s one line from the game you always seem to remember What’s one line from the game you always seem to remember

Posted On: March 10, 2026
Personally it’s “Listen here pipsqueak. Do not underestimate this opponent. At best you will have to blink of an eye to strike. Strike fist strike true defy the odds! For they are distinctly in it...[More]


In Season 2 of The Walking Dead, do I play as Clementine, or someone else? In Season 2 of The Walking Dead, do I play as Clementine, or someone else?

Posted On: March 25, 2023
I recently finished playing The Walking Dead Season 1 (and the 400 Days DLC), and I'm probably going to buy Season 2 very soon. However the one thing I'm not sure about is who I'll be play...[More]


What Pokemon characteristics are immutable as of gen 9 games? What Pokemon characteristics are immutable as of gen 9 games?

Posted On: February 6, 2023
I'm picking up Pokemon games with Violet and learning about every additions made to the game since gen 2, I'm having a hard time figuring out what are the Pokemon characteristics you can't change thro...[More]


Can you change your crew name? Can you change your crew name?

Posted On: April 28, 2024
Near the start of the campaign of Need for Speed Carbon on PS3, you are asked to pick a crew logo and name. Is it possible to change the crew name later on?Question from user Stevoisiak at gaming.stac...[More]


How can I change the death wait to 1 second in COD4: Modern Warfare in free for all games? How can I change the death wait to 1 second in COD4: Modern Warfare in free for all games?

Posted On: April 7, 2024
I host a server for me and my friends (Call of Duty 4 : Modern Warfare). We all enjoy playing hardcore but loath the wait (10 seconds after every death). I found some commands for the server console...[More]