[Tutorial] Geckolib plugin walking and death animation procedures, workspace, .bbmodels and mini tutorial

Started by urielito3010 on Wed, 02/03/2021 - 01:31

Topic category: User side tutorials

Last seen on 22:27, 9. Apr 2021
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
[Tutorial] Geckolib plugin walking and death animation procedures, workspace, .bbmodels and mini tutorial
Wed, 02/03/2021 - 01:31

First, I set the entity health to 800 (Really high number used for the death animation)

then, when the entity is spawned, it's health is set to 50 (The actual health of the mob)

Entity initial spawn procedure

Then, take a look at this procedure:

The tick update procedure

The most important part here, is detecting when the mob is moving, and playing an animation along it

Entity moving

The timer lets us set when we want the animation to start. Otherwise, it would just be constantly restarting.

Then, if you take a look at the entire procedure, you will see that even though the mob has 800 health, I reduce it to 50 when it spawns. This 50 is the true health of the mob. We use procedures to detect if the entity is in the dying state. Whenever it is below 15 health, or above 200 health, it is considered to be in dying state. When the entity enters the dying state (AKA: It reaches below 15 health) It starts the dying animation, doesn't play a walking animation because that animation only plays between 16 and 200 health, and heals back to 800 to not be killed while doing the animation. During the dying state, the mob suffers two potion effects: Slowness, and killerpot. Killerpot is a custom potion I made, that makes it so when the effect runs out, the entity despawns. The duration of the effect has to be set by you, and it has to be equal to the duration of the death animation.

Here is a video I recorded of the cyclops dying:

https://youtu.be/RTp0CF3RqS4

And here is an example of a poorly timed death animation: 

https://youtu.be/mZd9vedetRk

 

In the workspace, there is also an example of a monk playing with a bongo, but that's a bit too complex to explain in just this mini tutorial. If any of you have any doubts, let me know. If you have any bugs in general with the geckolib plugin, I will see if I can help you.

Last seen on 07:42, 15. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
can you teach me, how do i…
Sun, 02/07/2021 - 15:20

can you teach me, how do i add "OR" and "AND" parts?

Last seen on 22:27, 9. Apr 2021
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Get the logic (Light blue = …
Mon, 02/08/2021 - 18:23

Get the logic (Light blue = ) and press the = to change it to something else