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 a Minecraft command for changing biomes? Is there a Minecraft command for changing biomes?

Posted On: August 1, 2023
Is there a command in vanilla Minecraft to change the biome of an area? Question from user Kimatuy at stackexchange. Answer: No, there isn't, and I don't think any mod can do this. ...[More]


What is the rate of recharge for the Divine Blessing in Genshin Impact? What is the rate of recharge for the Divine Blessing in Genshin Impact?

Posted On: June 27, 2023
I've hit the limit of my divine blessing this week. I was next to the statue and it was empty. Didn't think I used it that much, and didn't hit the limit again after. Was weird. But ...[More]


Is it possible to beat Infinity Blade on the first bloodline? Is it possible to beat Infinity Blade on the first bloodline?

Posted On: September 22, 2023
I've played through two bloodlines so far in Infinity Blade. Both times I made it to the boss, and both times he beat me. I imagine it's possible to beat him after leveling up over the course ...[More]


Why is the firmware of the Xbox Wireless Controller not updated automatically? Why is the firmware of the Xbox Wireless Controller not updated automatically?

Posted On: January 19, 2024
I have now updated all Xbox Wireless Controllers (the first time since years). I didn't know that I had to do this regularly. Is there a reason why this is not done automatically? Updates to games...[More]


How is the League Of Legends Baron Power Play Calculated? How is the League Of Legends Baron Power Play Calculated?

Posted On: May 11, 2023
In the MSI Game G2 vs FW Caps managed to steal Nash. . The Baron Power Play total was +5431g. How was this calculated? I could imagine it to only count turrents and kills, but it seems to add / ...[More]


What should I do when I run out of potions in Final Fantasy 16? What should I do when I run out of potions in Final Fantasy 16?

Posted On: June 30, 2023
I am a short way into the game, just reached Martha's Rest in Rosaria, and there is a large open map at this point. I have taken the opportunity to grind some AP. However I only have a stock of...[More]


Haunted Hogsmede - Minding Your Own Business Haunted Hogsmede - Minding Your Own Business

Posted On: June 7, 2023
Am I the only one who found this incredibly difficult?. Maybe it was because I was on edge the whole time, but I feel like this is definitely the hardest quest I've done so far. I can't ...[More]


How much grain can a giant node produce with the production per 25 perk? How much grain can a giant node produce with the production per 25 perk?

Posted On: June 13, 2023
The total amount of stuff from a node can be increased by getting perks. Here are two such perks;. Mold supply: Increase the production of grain by +1 (or +2). Grain harvest: Increase the produc...[More]


Using - execute command, how do I check if a block is one of multiple possibilities? Using - execute command, how do I check if a block is one of multiple possibilities?

Posted On: April 8, 2024
Using an /execute command, I want to check if a certain block is, for example, either oak_fence, OR iron_bars.However, in my specific case, I can't just use two command blocks to check for either one ...[More]


Unforgivable curses in Hogwarts Legacy? Unforgivable curses in Hogwarts Legacy?

Posted On: April 4, 2023
Does anybody find it a bit odd that the unforgivable curses are seen as mega bad, yet diffindo where you are literally slicing someone or turning someone into a chicken is fine? Question from user ...[More]