2

I want to make a boss battle, and I wanted the boss to walk smoothly in a certain direction. I have tried:

/summon zombie ~ ~1 ~ {CustomName:"Zombo",CustomNameVisible:1,Motion:[0.0,0.0,-12.0], Attributes:[{Name:generic.movementSpeed,Base:2}

but the zombie does not smoothly move, it actually teleports. I thought of having a bunch of command blocks all in a row that kill the zombie and summon a new one every block, giving it the appearance of smooth motion. However, I would like something that I can run in just a few command blocks. Does anyone have experience with things like this? Thanks!

3
  • 1
    Did you know that there is a secret mob that Mojang tried to hide called "Giant"? The "Giant" mob is zombie textured and takes a while to kill having 200 HP and packs a punch! Use this command to summon one in (there is no spawn egg for this mob): /summon giant ~ ~1 ~ {CustomName:"Zombo",CustomNameVisible:1,Motion:[0.0,0.0,-12.0],Attributes:[{Name:generic.movementSpeed,Base:2} Commented Apr 29, 2021 at 12:39
  • You'll probably need to teleport the mob multiple times, using scoreboards to keep track of its current state. There's no way in the base game to get a mob to move overtime
    – Ben
    Commented Apr 30, 2021 at 14:46
  • Ok, thanks, I will use that. :) Commented Apr 30, 2021 at 14:47

1 Answer 1

1

A little tidbit of information: if an entity that usually walks is teleported relatively every tick, it will play its walking animation to match the speed that it's teleporting.

as an example, let's summon a giant with no AI for funsies:

summon giant ~ ~ ~ {NoAI:1b}

then put this into a repeating command block:

execute as @e[type=minecraft:giant] at @s run teleport @s ^ ^ ^.1

It'll actually make the giant appear to walk.

What you can do if you would like it to track a certain path is place stairs (or any 4-directional block) under the ground and turn the giant accordingly. Example:

execute as @e[type=minecraft:giant] at @s if block ~ ~-2 ~ minecraft:oak_stairs[facing=east] run teleport @s ~ ~ ~ 270 0
execute as @e[type=minecraft:giant] at @s if block ~ ~-2 ~ minecraft:oak_stairs[facing=west] run teleport @s ~ ~ ~ 90 0
execute as @e[type=minecraft:giant] at @s if block ~ ~-2 ~ minecraft:oak_stairs[facing=south] run teleport @s ~ ~ ~ 0 0
execute as @e[type=minecraft:giant] at @s if block ~ ~-2 ~ minecraft:oak_stairs[facing=north] run teleport @s ~ ~ ~ 180 0

This will turn the giant to face whatever direction a stair 2 blocks under it is facing. In conjunction with the other command, this will make the giant walk forward until it hits a stair, then change direction based on where the stair is pointing, and continue until it reaches the next one. I hope this was clear enough

2
  • Thanks! This helped a ton! Commented May 31, 2021 at 1:08
  • Good to hear! I forgot to mention that you should divide whatever you want the speed of the mob to be by 20, as that's the tick speed of a minecraft server. Teleporting it 0.1 block forward as shown in the example will make it go 2 blocks per second
    – Jam
    Commented May 31, 2021 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.