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]

Dynamic Lighting in (vanilla) Minecraft Dynamic Lighting in (vanilla) Minecraft

Posted On: August 25, 2023
I have already seen tutorials on Minecraft regarding dynamic lighting, but none of them seem fancy enough. What I'm thinking of is a way to make dynamic lighting that is clean and not destructi...[More]


What are all of the non-solo types in Pokemon games? What are all of the non-solo types in Pokemon games?

Posted On: April 3, 2023
In the Pokemon games that I have played (R/B/Y, G/S/C, R/S/E), I recall that there are some types that never go alone. For example, there is no pure Flying type Pokemon, there would at least be Nor...[More]


Crossed Wand final round Crossed Wand final round

Posted On: August 1, 2023
I just can't do it. I keep trying. That dummy practice is useless as its not at all like the real dual I just keep going back and back, and sie. The opponents even reheal? Sebastian is no bloody h...[More]


Best way of accumulating large amounts of Candy Corn in GW2 Best way of accumulating large amounts of Candy Corn in GW2

Posted On: December 26, 2023
The new Blood and Madness season has begun in GW2. New items have become available from the TP. These items range in price from 1 - 12 Candy Corn Cobs. The only way I know to get 1 Candy Corn Co...[More]


Please help me with Hogwarts Legacy Please help me with Hogwarts Legacy

Posted On: April 23, 2023
I was on my way to meet Jackdaw at the forbidden forest when I fell into this tomb, iv tried loading my different save points but iv spent so long in here that they are all putting me in the same spot...[More]


Hogwarts Avada Kedavara Hogwarts Avada Kedavara

Posted On: July 5, 2023
Can I still learn or is it too late?. I told Sebastian nobody should use the curse and then I told Ominis that we should turn him in. Will I get another chance to learn it or have I completely scre...[More]


Can the Haglins Satchel add any orb to your deck? Can the Haglins Satchel add any orb to your deck?

Posted On: December 7, 2023
The description for Haglin's Satchel says it "Randomly adds 2 orbs to your deck, then randomly upgrades orbs 4 times." Are there any limits to which orbs the Haglin's Satchel can ...[More]


Am I Locked Out? Romance Question Am I Locked Out? Romance Question

Posted On: April 29, 2024
I was trying to start a love triangle between my Dark Urge, Astarion, and Shadowheart. I slept with Astarion very early on. He was at exceptional approval before we even reached the goblin camp. (And ...[More]


BG3 Community, things just got out hand BG3 Community, things just got out hand

Posted On: May 20, 2024
So the BG3 twitter is in the middle of a drama because you should not get the Astarion scars as a tattoo as it is considered disrespectful and/or downright racist towards the black community because t...[More]


How do GameShark codes work? How do GameShark codes work?

Posted On: July 22, 2013
This has always boggled me. Obviously GameShark and Game Genie never got inside access to place their own cheats into every game. I don't think any developers gave them the source code to pour over fo...[More]