1

Command Blocks HELP

DrDragonite05's Avatar DrDragonite057/30/19 2:49 am history
1 emeralds 246 7
8/2/2019 5:47 am
HoboMaggot's Avatar HoboMaggot
Hey guys,

I'm making a command block turret and when it will be finished ill post world download here, but i have problem.

I make a turret with tag "Turret" and command block rotate it with facing command to nearest entity. Then i have a line of cmd blocks, that 1st checks if there is entity nearby, 2nd summons helping armor stand that will be explained in a moment, 3rd teleports the armor stand before to the looking coords ^ ^ ^1 of the Turret and you know when you teleport entity, it moves, and while it's moving 4th command block quickly summons a fireball in front of armor stand and 5th detect the teleport movement of the helping armor stand with tag "Aim" with command:

execute store result entity @e[tag=Missile,limit=1,sort=nearest] *1 Motion[0] *2 double 1 run data get entity @e[type=minecraft:armor_stand,tag=Aim,limit=1,sort=nearest] Motion[0] 1



*1 - fireball

*2 - this is made in 3 cmd blocks that each have Motion[0], Motion[1], Motion[2]

and then the last one deletes armor stand that helped us before.

This does NOT work and please, can you provide a solution? Problem is that motion detecting cmd-blocks always say 0 even the AIM armor stand does move, by teleport command. I've been sitting on this like an hour or so and can't find a solution.

If you want all the commands, here they are:








1st: execute as @e[type=minecraft:armor_stand,tag=Turret,limit=1,sort=nearest] run execute if entity @e[(type=!All the things that you dont want to target, and that's a lot),limit=1,sort=nearest,distance=..20] (repeatinng and all others are chain)

2nd: execute as @e[type=minecraft:armor_stand,limit=1,sort=nearest,tag=Turret] run summon armor_stand ~ ~ ~ {Marker:0b,Invisible:0b,PersistenceRequired:1b,Tags:["Aim"]}

3rd: execute as @e[type=minecraft:armor_stand,limit=1,tag=Turret,sort=nearest] run tp @e[tag=Aim] ^ ^ ^3

4th: execute at @e[type=minecraft:armor_stand,tag=Turret,limit=1,sort=nearest] run summon fireball ^ ^1.5 ^1 {life:1,direction:[0.0,0.0,0.0],power:[0.0,0.0,0.0],Tags:["Missile"]}

5th 6th and 7th are almost the same and command is listed on top



8th: kill @e[type=minecraft:armor_stand,sort=nearest,tag=Aim,limit=1]





Thank you,
DrDragonite
Posted by DrDragonite05's Avatar
DrDragonite05
Level 20 : Expert Miner
1

Create an account or sign in to comment.

7

2
07/30/2019 4:10 am
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
So the command just doesnt work?
A bunch of these commands looks very suspicious. The aim armor stand doesnt have any motion yet execute store is taking from that motion value.
The aim armor stand is tping every 3 blocks in front of it, since its a chain (dunno if conditional).

I suggest cleaning up the format as well.

1. execute as @e[type=minecraft:armor_stand,tag=Turret,limit=1,sort=nearest] at @s if entity @e[(type=!All the things that you dont want to target, and that's a lot),limit=1,sort=nearest,distance=..20] run tp @s ~ ~ ~ facing entity @e[(type=!All the things that you dont want to target, and that's a lot),limit=1,sort=nearest,distance=..20] This will make the turret detect and face the enemy entity.

2. execute as @e[type=minecraft:armor_stand,limit=1,sort=nearest,tag=Turret] at @s positioned ^ ^ ^3 run summon armor_stand ~ ~ ~ {Marker:0b,Invisible:0b,PersistenceRequired:1b,Tags:["Aim"]} This will summon the aim armorstand 3 blocks in front of the relative direction the turret is facing

3. execute at @e[type=minecraft:armor_stand,tag=Turret,limit=1,sort=nearest] run summon fireball ^ ^1.5 ^1 {direction:[0.0,0.0,0.0],power:[0.0,0.0,0.0],Tags:["Missile"]} You dont really need the life tag for your fireball


This might fix your problem of the fireball not spawning at all.

However, if your problem is the fireball not moving, its because of the armorstand
1
07/30/2019 8:17 am
Level 20 : Expert Miner
DrDragonite05
DrDragonite05's Avatar
Thanks, i really apprechiate your help!,



I dont understand command blocks THAT well but i am not a noob at them.

The problem is that when you teleport entity, id doesn't just appear there, it's MOVING there and i wanted to use that to my adventage.


But again thank You for your advice i apprechiate it, it helps!

DrDragonite
1
07/31/2019 5:56 am
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
Wait so you want to make the armorstand move towards the enemy entity?
1
07/31/2019 9:30 am
Level 20 : Expert Miner
DrDragonite05
DrDragonite05's Avatar
No, i make use of that when you teleport entity, it moves, so i capture that as a motion and get direction
1
08/01/2019 4:51 am
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
/tp doesnt work with motion.
to get the motion tag, the mob has to be moving, like a normal mob
1
08/01/2019 5:58 am
Level 20 : Expert Miner
DrDragonite05
DrDragonite05's Avatar
Then can you help me, because i need to get motion tag because of fireballs, so how?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome