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]

How to mark items as junk in The Outer Worlds? How to mark items as junk in The Outer Worlds?

Posted On: May 2, 2023
Items you've marked as Junk can be sold in bulk. Okay, so how do I mark items as junk? There is no UI in the game or anything else, just a tip that suggests that you can mark items as junk. ...[More]


How do I reset my sensor to track Shrines in Zelda Tears Of The Kingdom? How do I reset my sensor to track Shrines in Zelda Tears Of The Kingdom?

Posted On: May 31, 2023
I set my sensor to track the location of an item from the Hyrule Compendium. How do I reset it to start tracking Shrines again? Question from user Stevoisiak at gaming.stackexchange.com. Answer:...[More]


The combat has ruined this game for me The combat has ruined this game for me

Posted On: March 31, 2025
I think I've given Baldur's Gate 3 a fair shake. I've played through most of Act 1 and I think the characters and writing are great. The combat on the other hand, is absolutely horrendous. Every actio...[More]


Is mephiles the dark shadows long lost brother? Is mephiles the dark shadows long lost brother?

Posted On: January 22, 2023
Mephiles the dark’s regular form looks like shadow.Question from user JOEL SANTIAGO at gaming.stackexchange.com.Answer:I saw a video last time and it showed me mephiles the dark looks like shad...[More]


How many chapters are in Nier Reincarnation? How many chapters are in Nier Reincarnation?

Posted On: April 2, 2024
How many story chapters are in Nier Reincarnation? The game just released its final chapter. I just finished chapter 10 and want to know how many chapters I have left to complete before the game shuts...[More]


How do you pet Bubba with a controller? How do you pet Bubba with a controller?

Posted On: August 30, 2023
When playing Holocure on keyboard you can pet Amelia's dog Bubba by pressing P while standing next to him. However, I'm playing on Steam Deck. Is there a way to pet Bubba when playing with a c...[More]


Will the Cursed Swords one-hit death effect apply in Dead Cells? Will the Cursed Swords one-hit death effect apply in Dead Cells?

Posted On: April 18, 2023
The description of the Cursed Sword says "One hit and you're dead", presumably meaning you will die in one hit while it is equipped. However, there's a mutation called Porcupack that...[More]


How do you make Cuphead black and white? How do you make Cuphead black and white?

Posted On: March 13, 2024
I've seen screenshots of it, and a character on the third isle says something about you have to be a pacifist or something. How is it done?Question from user Levi C. Olson at gaming.stackexchange.com....[More]


Third Person Mode for Portal - Portal 2 Third Person Mode for Portal - Portal 2

Posted On: June 1, 2023
I picked up Portal and Portal 2 when they were on sale on Steam a few weeks back. I think these could be really good games, but I (for whatever reason) get vertigo when playing first person games. ...[More]


What happens if you play an attack card twice but the targeted enemy dies after its played once? What happens if you play an attack card twice but the targeted enemy dies after its played once?

Posted On: December 17, 2023
Let's say I'm facing a group of two enemies. I play Double Tap which makes it so my next attack is played twice. I then play Anger which does 6 damage and target an enemy that only has 6hp. Wh...[More]