Topic was automatically imported from the old Question2Answer platform.
Asked By
Iskailf
hi! im new to godot so please help. So basically i have a character animation that isn’t wearing a mask but if that player picks up a mask i want it to change the character animation that is wearing one.
If you’re using an animated sprite go to the SpriteFrames tab on the bottom, go to the left side and you can make a number of animations for the SpriteFrame resource and switch between them using AnimatedSprite.set_animation("animation name")
Oh sorry the info i gave was vague, im using an animationplayer and animationtree.
In my Animation Tree i made 4 roots which is Idle, Run, Facemaskidle, Facemaskrun.
while in the pickable item facemask i use an animated sprite for it.
currently the script inside the facemask is this:
which makes the facemask disappear when a player walk towards it
Iskailf | 2020-11-19 15:03
In the roots, the FacemaskIdle and FacemaskRun are the player sprites i made so when he comes on contact or collects the facemask it would switch to those animation instead of Idle and Run which is the Character that has no facemask on. i hope you get my idea
this is the code for my player: