The procedure for making a custom walk animation using the Geckolib plugin

Started by The Ult1mate Guy on

Topic category: User side tutorials

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The procedure for making a custom walk animation using the Geckolib plugin

Firstly, the procedure should be placed in the entity tick trigger.

It should look like:

Event Trigger (the top green part) [no additional trigger]

IF {[X velocity not equal to 0] AND [Z velocity not equal to 0]} OR {[X velocity not equal to 0] OR [Z velocity not equal to 0]}

   do IF [Get Event/target entity] data logic NBT tag "PlayingAnim" = false

     do {Play animation [animationnamehere] as entity [Event/target entity]. Should loop = false}

       Set [Event/target entity] data logic NBT tag "PlayingAnim" to true

    Else {set [Event/target entity] data number NBT tag "AnimTimer" to [Get [Event/target entity] data number NBT tag "AnimTimer"] - [1]

       IF [Get [Event/target entity] data number NBT tag "AnimTimer"] is less than or equal to [0]

         do {Set [Event/target entity] data logic NBT tag "PlayingAnim" to false}

              {Set [Event/target entity] data number NBT tag "PlayingAnim" to [animation time in seconds *20]}

Else if {[X velocity = 0] AND [Z velocity = 0]}

         do {Set [Event/target entity] data logic NBT tag "PlayingAnim" to false}

              {Set [Event/target entity] data number NBT tag "PlayingAnim" to [animation time in seconds *20]}

 

 

LMK if you have questions!

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have one question. This…
Mon, 11/30/2020 - 06:37

I have one question. This works for mcreator 2020.5? Or only for snapshots?

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It only works on the version…
Sun, 12/06/2020 - 00:51

It only works on the version the plugin is compatible for.

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to do…
Thu, 12/10/2020 - 16:17

Is there a way to do something similar for a jump animation?

Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a global trigger…
Thu, 12/10/2020 - 19:58

There is a global trigger called on entity jumps.

Check the entity is the custom entity and play the animation.

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i mean how can i import…
Tue, 12/29/2020 - 16:21

i mean how can i import geckolib animations

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need active animations or…
Wed, 12/30/2020 - 09:51

I need active animations or no active?

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And code blocks are too…
Wed, 12/30/2020 - 10:04

And code blocks are too complicated

 

Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you take a picture of…
Sun, 01/03/2021 - 00:48

can you take a picture of the procedure?

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I something like this? It…
Wed, 01/20/2021 - 11:41

I something like this?
It didn't work
MCreator GeckoLib animation procedure (didn't work)

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I fixed it and it works If…
Sat, 01/23/2021 - 13:01

I fixed it and it works

MCreator GeckoLib walking animation procedure (it actually work)

If i did sth wrong, please write me

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey I just tried to recreate…
Wed, 01/27/2021 - 23:52

Hey I just tried to recreate your code for a walking animation for the Attack Titan from AOT but it didn't work, I imported the .java file and the .json animation file, am I missing anything else?

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how did you added "and" and …
Sat, 02/06/2021 - 22:27

how did you added "and" and "or" commands

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try to use only 'play…
Thu, 02/11/2021 - 10:33

Try to use only 'play animation' for other triggers. For example: 'when entity falls'.
Then you can be sure animation is working.
If animation is correct, error is in 'procedure'.