Using animations

Started by maxpingouin on Sun, 04/26/2020 - 13:30

Topic category: Help with modding (Java Edition)

Last seen on 12:11, 6. Jul 2021
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Using animations
Sun, 04/26/2020 - 13:30

Hello,

I checked the recent updates and I would like to use custom animations in 1.12.2 in order to advance and finish a big project.

Since it isn't possible with MCreator basic tools I would like to know how could I execute an animation (with with special AoE damage) which would start at precise events or conditions using the code modifier.

It would help a lot and if I finish the project I could give some credits.

I plan on making special bosses and I can hardly imagine them using base animations due to their size / form / attack type.

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
what "animations" are you…
Sun, 04/26/2020 - 13:35

what "animations" are you looking to make?

Last seen on 12:11, 6. Jul 2021
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Attack / appearance / death …
Sun, 04/26/2020 - 17:06

Attack / appearance / death / Idle / Moving and others

I have no problems with making the animations but I want to know how to use them

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
you mean like arm swing…
Mon, 04/27/2020 - 04:46

you mean like arm swing animations as opposed to effects or texture animations?

if so, that requires a lot of trig math and you'll need to code them.

Last seen on 12:11, 6. Jul 2021
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I am asking how could I do it
Tue, 04/28/2020 - 13:20

I am asking how could I do it

Last seen on 12:11, 6. Jul 2021
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
using code
Tue, 04/28/2020 - 13:20

using code

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
that requires modifying your…
Tue, 04/28/2020 - 18:26

that requires modifying your entity class to add some fields for the wing swing amount. then you need to modify your entity's renderer class to pass along your wing swing amount to your model class. and at last in your model class' render method you will need to rotate your wing according to the wing swing amount.

to rotate the wing:

rightwing.rotateAngleZ = MathHelper.sin(this.wingSwingProgress * (float) Math.PI) * 2.0F;
leftwing.rotateAngleZ = MathHelper.sin(this.wingSwingProgress * (float) Math.PI) * -2.0F;

something like that, if your wing rotate along the Z axis. wingSwingProgress is your custom defined field passed from your entity's class through its renderer class.

in your entity class you need to define a wingSwingProgress that goes from 0.0F to 1.0F, where 0.0 is the wing's resting state, 0.5 is the most extended state, and 1.0 is back to resting state. so in your entity's onUpdate/onEntityUpdate method you just cycle that field from 0.0 to 1.0 continuously.

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
uh oh, x 2.0F maybe a bit…
Tue, 04/28/2020 - 18:29

uh oh, x 2.0F maybe a bit too much, just x 1.0F and x -1.0F