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]

Hogwarts Legacy is Excellent but lacking? Hogwarts Legacy is Excellent but lacking?

Posted On: April 17, 2023
Anyone else love the game but just feel they could have expanded on a lot of things? Beast taming could have been a proper side thing yet I'm just feeding them for materials, once I've gott...[More]


How do I save an Ultrahand creation to Autobuild without changing it? How do I save an Ultrahand creation to Autobuild without changing it?

Posted On: July 31, 2023
I am currently working on building a hoverbike that I can save with Autobuild. Since I've got it aligned and it flies straight, I'd rather not change it. However, I attached a stake to one of ...[More]


Can I skip the launcher when launching Baldurs Gate 3 from Steam? Can I skip the launcher when launching Baldurs Gate 3 from Steam?

Posted On: July 12, 2023
I don't want to have to go through the "Larian Launcher" when I want to play Baldur's Gate 3 in Steam. How can I skip it? Question from user Oak at stackexchange. Answer: To...[More]


Missing pushups in UFC Trainer Missing pushups in UFC Trainer

Posted On: March 27, 2023
I am about 3 days into my first 30-day challenge on UFC Trainer and have been getting frustrated that the game isn't picking up all of my push-ups. I can grind out 20 or so in the allotted...[More]


In Valheim, Do Fuling villages respawn? In Valheim, Do Fuling villages respawn?

Posted On: February 16, 2023
After clearing out a Fuling village, it looks like a good place to set up a base as long as they don't come back. Will the Fulings respawn after a while or is it a safe once the village is clear? ...[More]


I can't be the only one... I can't be the only one...

Posted On: October 10, 2024
Question from user TrickstersKeep at BaldursGate3 at reddit.com.Answer:What do you mean? I guided the Nautiloid to a safe landing. There was no Crash just a rough landing.Answer from user HangDol at B...[More]


Newbie, beginner dummie to BG3, guidance greatly appreciated Newbie, beginner dummie to BG3, guidance greatly appreciated

Posted On: October 20, 2023
I'm playing on PS5. I've played the Bethesda RPG's a lot, but this feels like another magnitude of complexity. I'm just getting started, managed to escape the ship and doing a little e...[More]


Can you die from an Unknown Location in Slay The Spire? Can you die from an Unknown Location in Slay The Spire?

Posted On: December 17, 2023
I encountered an Unknown Location (aka a ? room) with an option to upgrade 2 cards but would make me lose 16 HP. I encountered this room while I only had 1 hp. If I had taken the upgrade, would the ro...[More]


Does Lore Bard get good at later levels? Does Lore Bard get good at later levels?

Posted On: September 25, 2023
Hey all, I know basically all straight classes end up good enough, but I am trying to decide between a pure sorcerer or pure bard. I have a paladin/warlock sitting at the start of ACT 3 and just got b...[More]


What are the rules for mega evolutions in Pokemon go? What are the rules for mega evolutions in Pokemon go?

Posted On: January 15, 2023
The rules for Pokémon go's mega evolutions have changed over time. There doesn't seem to be any one place in the publisher, Niantic, states all the rules, mechanics and benefits for meg...[More]