Post by granny on Sept 4, 2023 21:13:45 GMT
Hello, I'm Granny, a player (and a staff member) on New Blood Zombie Survival & Map Build. This is a guide into how to make animations, a plugin created by opapinguin.
The Basics
What are animations?
Animations are loops that can be placed on blocks. You can create a block that loops between air, and lava, for example, with different values. When the animation reaches the end of it's loop, it restarts.
A shortcut for /animation is /anim
What are ticks?
Ticks are the foundation of animations. Every tick, or 1/10th of a second, the map checks for a block change. Hence, the minimum time to change a block's appearance is 1/10th of a second.
When you first try doing animations, you will see the message "/Animation [a/p?] [z?] [start] [block 1] [duration 1] [block 2] [duration 2]..." and you might be wondering what that means.
First, you might notice that some of the values have a question mark after it. This means that the value is not necessary.
[a/p?] -> Do not worry about this. This feature practically does not matter. If you have an existing loop and you want to switch it for another loop, you can use the p value. Otherwise, this has no use. (This does have use, it's just really really really complicated and has no practical use)
[z?] -> This is asking whether the animation should be pasted, like doing /z. It follows all the rules of /z (you need to left click two blocks), and will replace all the blocks in the region with the specified animation.
[start] -> This uses ticks to determine when the block should start animating. Ticks are measured in reference to the map's total ticks. When the map is first loaded, the map's ticks is 0, and every 1/10th of a second, it increases by 1. Start is an integer that is >= 0. This means the animation will start once the map's tick reaches the [start] value. When the map first loads, if the start value is greater than 0, the block that the animation was originally placed on will be visible for [start] ticks before starting the animation.
[block1] -> This is referring to the id of what the first block in a loop should be. Examples: 14 (gold ore), 48 (mossy rocks), 2 (grass).
[duration1] -> The number of ticks the first block stays before moving to the next block. 10 would be 1 second, 28 would be 2.8, etc.
[block2] -> Once block one's duration ends, the animation switches to block two. Specify the block id you wish to appear after the first block.
[duration2] -> Like duration1, this is asking the number of ticks the second block stays before switching to the next block.
... -> You can add as many animations as you want, you just need to specify another block id and it's duration.
Example in spoiler shown below.
For example:
/animation p z 15 1 10 2 10 3 5
p = I am replacing an already existing animation with this new animation
z = I am marking two corners in where the animation will be pasted
15 = This is the starting tick. When the map is loaded, the animation won't start until after 1.5 seconds
1 = the id of the first block (stone)
10 = the duration of the first block, which is 1 second
2 = the id of the second block (grass)
10 = the duration of the second block, which is also 1 second
3 = the id of the third block (dirt)
5 = the duration of the third block, which is 0.5 seconds
Once the animation is done with the first block, it loops back to the first block. There is no wait time before an animation loops
/anim del -> This is the shortcut for "/animation delete". As you may have guessed, this deletes the animation on a block, but does not delete the block behind it.
/anim del z -> This does the same thing as /anim del, but deletes animations in a region (does not delete the block behind the animation).
/anim copy -> It's /copy, but for animations.
/anim paste -> It's /paste, but for animations.
How To Make a Block "Move"
Although you cannot use one command to make a block seemingly move around the map, you can utilize animation techniques to make the block appear to move. To do this, you need a bit of logic, so bear with me.
Let's say I wanted to make a stone block move in a straight line to the gold block, then teleport back to the start.
(the red and white wool are for reference so you know how many blocks are in total)
On the first block, I would do /anim 0 1 10 0 60.
This means I am making a stone block appear for 10 ticks, then disappear for 60 ticks. The reason why I made the value 60 is because there are 6 blocks that the stone block ISN'T on the tile. I put 0 as the id of the second block because that is the id of air.
On the second block, I would do /anim 10 1 10 0 60
You might notice that I only changed one value, the start value. This means the loop will appear one second after the first loop, so it seems like the block is travelling.
On the third block, I would do /anim 20 1 10 0 60
Again, I only changed the start value because I just need the animation to appear 10 ticks after the second block. (Notice a 'coincidence'? I'm changing the start value by 10, and the time the stone appears is also 10. hm... [Once the animation of the first block ends, which is 10 ticks, the 2nd block's animation, which is delayed by 10 ticks, plays])
I keep adding this until the last block, which I would do /anim 60 1 10 0 60. Once this is done displaying, the block will teleport back.
KEY POINTS
-> When making a block appear to move, input the the value of air as the time the block ISN'T there
-> Once a animation is done, it repeats
-> 0 is the id of air
-> You can change the duration of the block, but you also need to change the duration of the time the block isn't there
Animations DON'T need to be in a straight line! Try experimenting with zig-zags, spirals and whatnot. Just keep in mind, try not to make the animations too far apart, or else it wont give the illusion that the block is moving
Platform Animations
Lets say you wanted to make a platform that players can cross made of stone
(13x5)
(The stone will be replaced later on, this is just to help building)
First, you would need to decide how big the platform is. For demonstration purposes, I want make my platform a 3x3 square.
Next, you need to think how long the animation will last. Since the pit is 13 blocks wide, 13x3 = 39 total ticks.
The platform should roughly move at the player's walking speed. The player's walking speed is roughly 3 ticks / block (it's actually slightly faster, but unfortunately decimal values aren't allowed). This means that all duration values of the animation should be multiples of 3.
For this platform, I would also need to use z (since the animation is the same in a line). For the first column of animations, I would do /anim z 0 1 9 0 30
start = 0 because this is the first animation
block id1 = 1 because that is the id of stone
duration1 = 9 because, since the platform is going to be a 3 by 3, I would need this column to stay for three 'times'. The first time it appears it is the right edge of the platform. The second time it is the middle, and the third it is the left edge. Therefore, 3x3 = 9
block id2 = 0 because that is the id of air
duration2 = 30 because this is the total amount of time the block isn't a part of the platform. You can also find this value by doing some quick math: total time - time displayed = time not displayed (39 - 9 = 30).
The second column of animation would be /anim z 3 1 9 0 30. Like mentioned above, only the start value changed because I only want the animation to start later, it is symmetrical to the first animation.
The third column would be /anim z 6 1 9 0 30
The fourth column would be /anim z 9 1 9 0 30 and so on... (the start value and duration1 value are the same is purely a coincidence)
The last one (13th column) would be /anim z 36 1 9 0 30.
KEY POINTS
-> When making a platform, use 3 times [total length] to figure out what the total number of ticks is
-> A block becomes a different relative part of the platform (right, middle, left), before disappearing
-> Use /anim z when making columns of the same animation
-> Use "placeholder" blocks to build animations on, this will make your life a lot easier
And that's it! That is how you make a platform, you can try experimenting with different lengths, blocks, and different heights!
Thank you for reading my basic guide on animations! If you have questions, please feel free to message me on discord, my username is "cytusi". If you want inspiration for some animations, I recommend
you go to granny6, an animation-oriented ZS map!
Ciao
The Basics
What are animations?
Animations are loops that can be placed on blocks. You can create a block that loops between air, and lava, for example, with different values. When the animation reaches the end of it's loop, it restarts.
A shortcut for /animation is /anim
What are ticks?
Ticks are the foundation of animations. Every tick, or 1/10th of a second, the map checks for a block change. Hence, the minimum time to change a block's appearance is 1/10th of a second.
When you first try doing animations, you will see the message "/Animation [a/p?] [z?] [start] [block 1] [duration 1] [block 2] [duration 2]..." and you might be wondering what that means.
First, you might notice that some of the values have a question mark after it. This means that the value is not necessary.
[a/p?] -> Do not worry about this. This feature practically does not matter. If you have an existing loop and you want to switch it for another loop, you can use the p value. Otherwise, this has no use. (This does have use, it's just really really really complicated and has no practical use)
[z?] -> This is asking whether the animation should be pasted, like doing /z. It follows all the rules of /z (you need to left click two blocks), and will replace all the blocks in the region with the specified animation.
[start] -> This uses ticks to determine when the block should start animating. Ticks are measured in reference to the map's total ticks. When the map is first loaded, the map's ticks is 0, and every 1/10th of a second, it increases by 1. Start is an integer that is >= 0. This means the animation will start once the map's tick reaches the [start] value. When the map first loads, if the start value is greater than 0, the block that the animation was originally placed on will be visible for [start] ticks before starting the animation.
[block1] -> This is referring to the id of what the first block in a loop should be. Examples: 14 (gold ore), 48 (mossy rocks), 2 (grass).
[duration1] -> The number of ticks the first block stays before moving to the next block. 10 would be 1 second, 28 would be 2.8, etc.
[block2] -> Once block one's duration ends, the animation switches to block two. Specify the block id you wish to appear after the first block.
[duration2] -> Like duration1, this is asking the number of ticks the second block stays before switching to the next block.
... -> You can add as many animations as you want, you just need to specify another block id and it's duration.
Example in spoiler shown below.
For example:
/animation p z 15 1 10 2 10 3 5
p = I am replacing an already existing animation with this new animation
z = I am marking two corners in where the animation will be pasted
15 = This is the starting tick. When the map is loaded, the animation won't start until after 1.5 seconds
1 = the id of the first block (stone)
10 = the duration of the first block, which is 1 second
2 = the id of the second block (grass)
10 = the duration of the second block, which is also 1 second
3 = the id of the third block (dirt)
5 = the duration of the third block, which is 0.5 seconds
Once the animation is done with the first block, it loops back to the first block. There is no wait time before an animation loops
/anim del -> This is the shortcut for "/animation delete". As you may have guessed, this deletes the animation on a block, but does not delete the block behind it.
/anim del z -> This does the same thing as /anim del, but deletes animations in a region (does not delete the block behind the animation).
/anim copy -> It's /copy, but for animations.
/anim paste -> It's /paste, but for animations.
How To Make a Block "Move"
Although you cannot use one command to make a block seemingly move around the map, you can utilize animation techniques to make the block appear to move. To do this, you need a bit of logic, so bear with me.
Let's say I wanted to make a stone block move in a straight line to the gold block, then teleport back to the start.
(the red and white wool are for reference so you know how many blocks are in total)
On the first block, I would do /anim 0 1 10 0 60.
This means I am making a stone block appear for 10 ticks, then disappear for 60 ticks. The reason why I made the value 60 is because there are 6 blocks that the stone block ISN'T on the tile. I put 0 as the id of the second block because that is the id of air.
On the second block, I would do /anim 10 1 10 0 60
You might notice that I only changed one value, the start value. This means the loop will appear one second after the first loop, so it seems like the block is travelling.
On the third block, I would do /anim 20 1 10 0 60
Again, I only changed the start value because I just need the animation to appear 10 ticks after the second block. (Notice a 'coincidence'? I'm changing the start value by 10, and the time the stone appears is also 10. hm... [Once the animation of the first block ends, which is 10 ticks, the 2nd block's animation, which is delayed by 10 ticks, plays])
I keep adding this until the last block, which I would do /anim 60 1 10 0 60. Once this is done displaying, the block will teleport back.
KEY POINTS
-> When making a block appear to move, input the the value of air as the time the block ISN'T there
-> Once a animation is done, it repeats
-> 0 is the id of air
-> You can change the duration of the block, but you also need to change the duration of the time the block isn't there
Animations DON'T need to be in a straight line! Try experimenting with zig-zags, spirals and whatnot. Just keep in mind, try not to make the animations too far apart, or else it wont give the illusion that the block is moving
Platform Animations
Lets say you wanted to make a platform that players can cross made of stone
(13x5)
(The stone will be replaced later on, this is just to help building)
First, you would need to decide how big the platform is. For demonstration purposes, I want make my platform a 3x3 square.
Next, you need to think how long the animation will last. Since the pit is 13 blocks wide, 13x3 = 39 total ticks.
The platform should roughly move at the player's walking speed. The player's walking speed is roughly 3 ticks / block (it's actually slightly faster, but unfortunately decimal values aren't allowed). This means that all duration values of the animation should be multiples of 3.
For this platform, I would also need to use z (since the animation is the same in a line). For the first column of animations, I would do /anim z 0 1 9 0 30
start = 0 because this is the first animation
block id1 = 1 because that is the id of stone
duration1 = 9 because, since the platform is going to be a 3 by 3, I would need this column to stay for three 'times'. The first time it appears it is the right edge of the platform. The second time it is the middle, and the third it is the left edge. Therefore, 3x3 = 9
block id2 = 0 because that is the id of air
duration2 = 30 because this is the total amount of time the block isn't a part of the platform. You can also find this value by doing some quick math: total time - time displayed = time not displayed (39 - 9 = 30).
The second column of animation would be /anim z 3 1 9 0 30. Like mentioned above, only the start value changed because I only want the animation to start later, it is symmetrical to the first animation.
The third column would be /anim z 6 1 9 0 30
The fourth column would be /anim z 9 1 9 0 30 and so on... (the start value and duration1 value are the same is purely a coincidence)
The last one (13th column) would be /anim z 36 1 9 0 30.
KEY POINTS
-> When making a platform, use 3 times [total length] to figure out what the total number of ticks is
-> A block becomes a different relative part of the platform (right, middle, left), before disappearing
-> Use /anim z when making columns of the same animation
-> Use "placeholder" blocks to build animations on, this will make your life a lot easier
And that's it! That is how you make a platform, you can try experimenting with different lengths, blocks, and different heights!
Thank you for reading my basic guide on animations! If you have questions, please feel free to message me on discord, my username is "cytusi". If you want inspiration for some animations, I recommend
you go to granny6, an animation-oriented ZS map!
Ciao