#Animations for holding

1 messages · Page 1 of 1 (latest)

final rose
#

ive got no experience with player animations btw

prime warren
#

i was having problems with this aswell, coudlnt find where I’d add the animation controllers

#

If someone gives you the solution can you @ me?

final rose
#

yeah for sure

quick marsh
#

this is pretty simple to do, just go to 'player.entity.json' and then in animations add your zombie_holding animation (just add it and don't remove other animations), then go to scripts and animate it by using query.is_item_name_any
Here's the example :

  "zombie_holding": "animation.zombie.attack_bare_hand"
},
"scripts": {
  "animate": [ {"zombie_holding":"query.is_item_name_any('slot.weapon.mainhand',0,'your_custom_item_identifier','player')"}
  ]
}```
prime warren
#

hell yea!!!

#

this is such a W community

final rose
#

thank you so much felix!

#

one issue, the model is invisible now

#

(its an attachable)

quick marsh
#

it's invisible?

final rose
#

yes

#

like, i cant see it in first person, in third person i can see it

final rose
#

@quick marsh

quick marsh
#

for the animations in first person, you have to follow the wiki.dev tutorials about attachables, because currently first person animations are a bit confusing to master

#

but it shouldn't be too hard

#

just make 2 animations, one's for first person and the other one's for third person

final rose
#

yeah ive got that

#

wait, do i just delete the other 3rd person animation?

quick marsh
#

well you just need 1 third person animation

#

and 1 first person animation

final rose
#

the 3rd person animation is in the attachable file

quick marsh
#

could add more but that means you have to add both the third and first person animations

quick marsh
final rose
#
    "format_version": "1.10.0",
    "minecraft:attachable": {
        "description": {
            "identifier": "xx:colt_m1911",
            "materials": {
                "default": "entity",
                "enchanted": "entity_alphatest_glint"
            },
            "textures": {
                "default": "textures/guns/colt_m1911",
                "enchanted": "textures/misc/enchanted_item_glint"
            },
            "geometry": {
                "default": "geometry.colt_m1911"
            },
            "animations": {
                "first_person": "animation.colt_m1911.first_person",
                "third_person": "animation.colt_m1911.third_person"
            },
            "scripts": {
                "animate": [
                    {
                        "first_person": "context.is_first_person == 1.0"
                    },
                    {
                        "third_person": "context.is_first_person == 0.0"
                    }
                ]
            },
            "render_controllers": [
                "controller.render.item_default"
            ]
        }
    }
}```
#

both the first and third is in the attachable file

final rose
quick marsh
#

try sending your player entity code

final rose
quick marsh
#

zombie_holding effects first person and third person animations, try adding !variable.is_first_person so it doesn't play in first person

final rose
#

where would i add that

quick marsh
#

with the query.is_item_name_any

#

add && and then put !variable.is_first_person

final rose
#

"zombie_holding": "query.is_item_name_any('slot.weapon.mainhand', 0, 'Sxx:colt_m1911', 'Sxx:olympia', 'Sxx:remington_700' 'player'), && !variable.is_first_person"

#

like that?

quick marsh
#

yes but don't put a comma before &&

#

after that try checking it ingame

#

it won't fix the animation just yet, you still need to make the weapon look right in the first person anim

final rose
#

yeah it all works now

#

i already had a basic first person holding

#

but i wanted the arms up in third person so

#

thank you though!!!

quick marsh
#

happy to help!