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 there any way into the Abandoned the Zelda Hebra Mine forge tower? Is there any way into the Abandoned the Zelda Hebra Mine forge tower?

Posted On: July 7, 2023
In the Abandoned Hebra Mine, on top of the forge construct tower there is some unusual smoke coming out of the chimney. Is there any way into this tower? Or is there nothing more to it?. I've d...[More]


Minecraft Texture Pack on Server over FTP Minecraft Texture Pack on Server over FTP

Posted On: June 7, 2023
Today I tried to "install" a texture pack on my server (verygames) to let all my users use the same texture pack.To do this, I found a way with editing the server.properties at line "resource-pack=".I...[More]


What are the benefits of playing with original game CDs? What are the benefits of playing with original game CDs?

Posted On: June 10, 2023
Please don't take me in the wrong sense. I am not advocating for piracy. In fact I want to know about the advantages of playing with original game CDs so that I can attract gamers in my region, in...[More]


Do Squirrel Bits Actually Come From Squirrels in Fallout 4? Do Squirrel Bits Actually Come From Squirrels in Fallout 4?

Posted On: March 12, 2023
There are two main things that led me to this question: 1) I've never seen a squirrel in the Commonwealth, and 2) I learned that some meat sources are intentionally mislabeled (see Longneck Lukows...[More]


Does renaming a pokemon to its original name count as a nickname? Does renaming a pokemon to its original name count as a nickname?

Posted On: June 15, 2023
Basically what I actually want to know is, if I rename a Pokémon to its original name and trade it, will the traded Pokémon evolve with its proper evolved Pokémon name or retain i...[More]


Reset nether but preserve above ceiling in Minecraft? Reset nether but preserve above ceiling in Minecraft?

Posted On: April 13, 2023
I'm running a Minecraft server (version 1.15.2), and I plan to reset the nether for the 1.16 update. I would like to keep anything that's been built above the nether ceiling. Obviously, res...[More]


Where can I find pearls in Witcher 3? Where can I find pearls in Witcher 3?

Posted On: March 5, 2023
I am playing Witcher 3 from after patch 1.05. Is it possible to buy shells (pearls) from a merchant, or do I have to find them somewhere? Question from user Purple Rabbit at gaming.stackexchange...[More]


What do the stars under can produce mean in against the storm What do the stars under can produce mean in against the storm

Posted On: February 7, 2023
Does it mean it can produce those goods faster, higher quality or what? Is it worth it to replace buildings with higher starred versions or prioritize going for buildings with new stuff?So for example...[More]


Where does this blue cube-shaped object belong in Unpacking? Where does this blue cube-shaped object belong in Unpacking?

Posted On: July 25, 2023
I cannot understand what this blue cube-shaped object is. I cannot find where it belongs. Every place I put it in shows it's wrong. Where should I place this object? Question from user sdo at s...[More]


Does Fallout 4 have a color filter like Fallout 3 and Fallout: New Vegas? Does Fallout 4 have a color filter like Fallout 3 and Fallout: New Vegas?

Posted On: April 22, 2024
Previous 3D Fallout games, Fallout 3 (green) and Fallout: New Vegas (orange), both have a color filter (filter enabled on the left, disabled on the right):.Fallout 3:.New Vegas:.By looking at Fallout ...[More]