I am making a command that is /execute @e[type=Snowball] -603 4 170 /summon PrimedTnt
So whenever I throw a snowball at the specific coordnates, it will blow up. Is there a way to make it so there are infinite coords so no matter where the snowball lands it blows up no matter what?
Thanks
1 Answer
You're misunderstanding the purpose of the coordinates a little bit. The command as you have it will summon a primed TNT at -603 4 170
for every snowball. No matter where those snowballs are in the world, that is where the TNT will go.
What you'll want to do is use tilde notation to specify relative coordinates:
/execute @e[type=Snowball] ~ ~ ~ summon PrimedTnt
What this will do is summon primed TNT at the coordinates of every snowball entity. Be careful about putting this in a clock without some sort of /kill @e[type=Snowball]
command, unless you want to have TNT summoned along the entire trajectory of the snowball.
-
Ok Thanks! Yes I know what you mean I already put that command into a command block next to a repeater the '/kill @e[type=Snowball]' Commented Nov 18, 2014 at 3:27
-
how would you set it up then? i mean the full redstone and stuff Commented Nov 19, 2014 at 11:17
-
I did /testfor @e[type=Snowball] comparator 5 ticks then I did the execute command and then I connected a repeater to that and did /kill @e[type=Snowball] Commented Dec 2, 2014 at 20:26