BerndiVader / MythicAnimatorStands

Do some fun with ArmorStands.
4 stars 5 forks source link

AnimatorStands 4 MythicMobs

Update 18.03.2024 0.494

How to install?

Usage?

  1. You need a MythicMobs mob with the type of armor_stand. How to setup an armor_stand mob with MythicMobs look here: http://www.mythicmobs.net/manual/doku.php/databases/mobs/options#armor_stands
  2. At least one animation that you can apply to your mob. You find some examples in the folder "MythicMobs/Anims/" This is btw the folder where all your animations should be stored.
  3. Setup the skills to make the MythicMobs an AnimateStand:

Init the MythicMob

The first thing to do is: Initialize the MythicMobs mob as an AnimatorStand. This can be done with this mechanic:

- asinit{anim=Example.anim;plate=false;mobtype=mythicmob;autoinit=false;animspeed=0} @self ~onSpawn 1

This skill will setup the AnimateStand and assign the animation "Example.anim" to it. The option plate is optional. If false the armorstand will have no plate. The animation will only be loaded if it wasnt already cached befor. Now the mob is ready to be animated.

anim, or a = filename. The animfile have to be in the folder MythicMobs/Anims/Filename.anim

plate or base: true if the armorstand have a baseplate or false if not.

mobtype: the mythicmob used for the AI. (required)

animspeed: the delay in ticks

Change animation for the AnimatorStand:

  - aschange{anim=flip.anim;animspeed=xx} @self

This skill allows to change the animation. Useful for different animations on different events like damage attack and that stuff.

anim or a: filename of the new animation.
animspeed: the dealy in ticks

Pause the AnimateStand:

With this skill you can pause the animation.

 - asPause @self

Simple as that. There are no other options.

Restart the Animation again:

- asRun @self

Also pretty simple. No other options here neither.

Conditions: - AnimateStandPaused

 - AnimateStandPaused{a=true/false}

Meet the condition if the animation is paused or not if not.

Conditions: - isAnimateStand

 - isAnimateStand

Meet the condition if the MythicMob is an AnimateStand or false if not.

Conditions: - aimobtargetdistance

 - aimobtargetdistance{d=RangedValue;a=true/false}

Meet the condition if the animatorstand have a aimob and that aimob have a target where the distance rangedvalue meet or not.

Targeter: - aitarget

@aitarget

If the animatorstand has an aimob use this targeter to target the aimobs target inside the animatorstand skills.

Examples:

animator:
  Type: armor_stand
  Options:
    HasArms: true
    ItemBody: COS_GreenChest
    ItemFeet: COS_BlueFeet
    ItemHand: COS_IronSword
    ItemHead: BlackbeardHead
    ItemLegs: COS_YellowLegs
  Riding: Rudolf
  Skills:
  - asinit{anim=Example.anim} @self ~onSpawn 1
  - asanimate{anim=Example.anim;r=20;d=0} @self ~onTimer:20 1

Rudolf:
  Mobtype: rabbit
  Options:
    MovementSpeed: 0.1
    PreventRenaming: true
  Skills:
  - potion{type=INVISIBILITY;duration=4000;level=1} @self ~onSpawn 1
Example for MOVESTOPP & MOVESTART:

moonwalker:
  Type: armor_stand
  Options:
    Small: true
    HasArms: true
    ItemBody: COS_GreenChest
    ItemFeet: COS_BlueFeet
    ItemHand: COS_IronSword
    ItemHead: BlackbeardHead
    ItemLegs: COS_YellowLegs
  Skills:
  - asinit{anim=Example1.anim;mobtype=aimob} @self ~onSpawn
  - asanimate{r=20;d=0} @self ~onTimer:20
  - aspause @self ~onSignal:MOVESTOPP
  - asrun @self ~onSignal:MOVESTART
  - skill{s=makeAttack} @trigger ~onAttack
  - skill{s=playDamage} @trigger ~onDamaged 
  - message{msg="You killed me!"} @trigger ~onSignal:DEATH

aimob:
  Type: pigzombie
  Options:
    Silent: true
    PreventOtherDrops: true

playDamage:
  Cooldown: 1
  Skills:
  - aschange{anim=flip.anim} @self
  - delay 15
  - aschange{anim=Example1.anim} @self

makeAttack:
  Cooldown: 1
  Skills:
  - aschange{anim=winke.anim} @self
  - delay 8
  - damage{a=0.5} @trigger
  - delay 8
  - aschange{anim=Example1.anim} @self
moonwalker:
  Type: armor_stand
  Options:
    HasArms: true
    ItemBody: COS_GreenChest
    ItemFeet: COS_BlueFeet
    ItemHand: COS_IronSword
    ItemHead: BlackbeardHead
    ItemLegs: COS_YellowLegs
  Skills:
  - asinit{anim=Example1.anim;mobtype=aimob} @self ~onSpawn
  - asanimate{r=20;d=0} @self ~onTimer:20
  - skill{s=makeAttack} @trigger ~onAttack
  - skill{s=playDamage} @trigger ~onDamaged 
  - message{msg="You killed me!"} @trigger ~onSignal:DEATH

aimob:
  Type: pigzombie
  Options:
    Silent: true
    PreventOtherDrops: true
  AIGoalSelectors:
    - 0 clear
    - 1 meleeattack
    - 2 randomstroll
    - 3 float
  AITargetSelectors:
    - 0 clear
    - 1 players

skillfile:

playDamage:
  Cooldown: 1
  Skills:
  - aschange{anim=flip.anim} @self
  - delay 15
  - aschange{anim=Example1.anim} @self

makeAttack:
  Cooldown: 1
  Skills:
  - aschange{anim=winke.anim} @self
  - delay 8
  - damage{a=0.5} @trigger
  - delay 8
  - aschange{anim=Example1.anim} @self
Example animfile:

interpolate
length 16
frame 0
Armorstand_Position 0.0 0.0 0.0 0.0
Armorstand_Middle -1.7735 -1.9591 0
Armorstand_Right_Leg 0 4.7462 12.0494
Armorstand_Left_Leg 0 -5.2681 -6.6472
Armorstand_Left_Arm 6.1476 0 -42.2486
Armorstand_Right_Arm 0 -3.1448 41.9762
Armorstand_Head 0 -24.967 -0.4532
frame 7
executeSkill particlestest @PIR{r=5}
Armorstand_Position 0.0 0.0 0.0 0.0
Armorstand_Middle 0 0 -2.4842
Armorstand_Right_Leg 0 0 13.5406
Armorstand_Left_Leg 0 -6.5557 -15.3523
Armorstand_Left_Arm -8.7445 0 -151.9446
Armorstand_Right_Arm 10.178 0 154.3655
Armorstand_Head 9.236 2.7374 -9.5706
frame 15
Armorstand_Position 0.0 0.0 0.0 0.0
Armorstand_Middle -1.7735 -1.9591 0
Armorstand_Right_Leg 0 4.7462 12.0494
Armorstand_Left_Leg 0 -5.2681 -6.6472
Armorstand_Left_Arm 6.1476 0 -42.2486
Armorstand_Right_Arm 0 -3.1448 41.9762
Armorstand_Head 0 -24.967 -0.4532

Skill file:
particlestest:
  Skills:
  - particles{particle=heart;amount=8;vSpread=0.5;hSpread=0.5;Spped=0.01;yoffset=1}

Update History: