1

Need help with a command!

lnard's Avatar lnard7/23/19 3:11 am
1 emeralds 137 7
7/23/2019 5:48 am
MrCocoplants's Avatar MrCocoplants
Hey to anyone reading this I was just working on a small project of mine, I was thinking of making an explosive arrow. I already did the usual inGround arrow where if it hits a blocks it would explode, but my problem is whenever it hits a mob it doesn't trigger I might need some help on how should I make this arrow work where when it's close to a mob it would explode.



Any Help would be appreciated
Posted by lnard's Avatar
lnard
Level 1 : New Miner
0

Create an account or sign in to comment.

7

1
07/23/2019 5:48 am
Level 18 : Journeyman Engineer
MrCocoplants
MrCocoplants's Avatar
i have found these 2 links of sethblings youtube channel:
https://www.youtube.com/watch?v=6Jintj0FCfk
https://www.youtube.com/watch?v=vxDi41dmgMc

maybe these will help you.
2
07/23/2019 3:44 am
Level 74 : Legendary Technomancer
Siscu
Siscu's Avatar
The thing's that whenever an arrow hits an entity, it inflicts damage and disappears without having the InGround tag.

I'd try to solve it using a tnt constantly teleporting to the arrow until it disappears, but I'm not that sure tbh

Anyways, good luck with your project!
3
07/23/2019 3:46 am
Level 74 : Legendary Technomancer
Siscu
Siscu's Avatar
Another option would be using a repeated testfor on the arrow so when any entity enters his radius makes it explode, but you'd have to figure out a way for the testfor to ignore the arrow itself
1
07/23/2019 3:52 am
Level 1 : New Miner
lnard
lnard's Avatar
Yeah, the second option is better as the radius detection is much more consistent than a tnt following an arrow.




Thanks for the assist!
1
07/23/2019 4:36 am
Level 11 : Journeyman Network
TigerJack10
TigerJack10's Avatar
Try doing something along the lines of execute if entity @e[type=!arrow,limit=1] run <command> and just run that every tick.
1
07/23/2019 4:42 am
Level 74 : Legendary Technomancer
Siscu
Siscu's Avatar
The problem arises qhen you figure out the player is also an entity and the arrow may explode when shooted xDD
1
07/23/2019 4:56 am
Level 74 : Legendary Technomancer
Siscu
Siscu's Avatar
I'd fix that by starting the testfor when the arrow has a certain lifetime, so the shooter is not affected just by firing the arrow
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome