4
How to make a warden spawn 6 more wardens when it reaches half health
Pls tell me how to do it
Create an account or sign in to comment.
3
1
OO! ok so you want to trigger a spawn when a warden is at half health? i got a solution, just not a very good one :P
So what i did was make 10 commands on repeat and it checks for varies in health around the half way mark.
execute as @e[nbt={ Health:250.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:249.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:248.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:247.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:246.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:245.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:244.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:243.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:242.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:241.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:240.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run tag @s add stop
There are three functions to this
1st: check health, then give take if below half way
2nd: spawn wardens, at tagged entity
3rd: if the entity does not have the stop tag give it that and it will stop with every command in there!
Goodluck with the datapack!
So what i did was make 10 commands on repeat and it checks for varies in health around the half way mark.
execute as @e[nbt={ Health:250.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:249.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:248.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:247.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:246.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:245.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:244.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:243.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:242.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:241.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[nbt={ Health:240.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[tag=Spawnwardens] at @s unless entity @s[tag=stop] run tag @s add stop
There are three functions to this
1st: check health, then give take if below half way
2nd: spawn wardens, at tagged entity
3rd: if the entity does not have the stop tag give it that and it will stop with every command in there!
Goodluck with the datapack!
1
Ok so uh... that method does not work anymore :p
it used to but if your using the latest version i would do this.
Single commands:
scoreboard objectives add Health dummy
Repeating commands:
execute as @e[type=minecraft:warden] unless entity @s[tag=stop] store result score @s Health run data get entity @s Health
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run tag @s stop
it used to but if your using the latest version i would do this.
Single commands:
scoreboard objectives add Health dummy
Repeating commands:
execute as @e[type=minecraft:warden] unless entity @s[tag=stop] store result score @s Health run data get entity @s Health
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run tag @s stop
2
Looking forward to an answer (if one comes); I did not read the title as a question