I'm building a bow that shoots explosive arrows. They are SUPPOSED to explode when any entity gets too close, when they hit the ground, or when they've been flying for more than five seconds. Here's the lines I wrote:
In that order, in a chain of command blocks. The problem now is that when it gets close to any entity, it won't explode. It works on the ground and after five seconds of flight. There's probably some stupid simple solution that I haven't thought of, but I'm completely talentless.
I'm building a bow that shoots explosive arrows. They are SUPPOSED to explode when any entity gets too close, when they hit the ground, or when they've been flying for more than five seconds. Here's the lines I wrote:
(With a dummy objective named 'mortar')
/scoreboard players set @a mortar 0
/scoreboard players set @a mortar 1 {SelectedItem:{id:"minecraft:bow",tag:{display:{Name:"Mortar"}}}}
/execute @a[score_mortar_min=1,score_mortar=1] ~ ~ ~ scoreboard players set @e[type=arrow,r=2] mortar 2
/execute @e[type=arrow,score_mortar_min=8] ~ ~ ~ particle flame ~ ~ ~ 0.1 0.1 0.1 0 2
/scoreboard players set @e[type=arrow,score_mortar_min=8,score_mortar=100] mortar 100 {inGround:1b}
/execute @e[type=!arrow] ~ ~ ~ scoreboard players set @e[r=2,type=Arrow,score_mortar_min=8,score_mortar=100] mortar 100
/execute @e[type=Arrow,score_mortar_min=100,score_mortar=100] ~ ~ ~ particle flame ~ ~ ~ 0.1 0.1 0.1 0.35 85
/execute @e[type=Arrow,score_mortar_min=100,score_mortar=100] ~ ~ ~ playsound minecraft:entity.blaze.shoot voice @a ~ ~ ~ 2 1
/execute @e[type=Arrow,score_mortar_min=100,score_mortar=100] ~ ~ ~ summon creeper ~ ~0 ~ {CustomName:"Mortar Shell",ExplosionRadius:4,Fuse:0}
/kill @e[type=Arrow,score_mortar_min=100]
/scoreboard players add @e[type=Arrow,score_mortar_min=2] mortar 1
In that order, in a chain of command blocks. The problem now is that when it gets close to any entity, it won't explode. It works on the ground and after five seconds of flight. There's probably some stupid simple solution that I haven't thought of, but I'm completely talentless.
--Northie