SOLVED Synchronizing equipped weapon animation with player animation

X

XJ_Dan

Guest
Hello!

After struggling, searching on google and YouTube all day I hope someone over here could help me out with this problem.

I made an inventory system with a weapon slot (for a sidescroller RPG), once you put the weapon in the weapon slot if appears on the player. The weapon is an object layered on top on the player with the same amount of frames as the player, but every time I equip the weapon the idle animation is out of sync. I have tried a lot of (probably poorly executed) different things but they didn't work out.

Does anyone know how to set the frame to the same frame as the main character once it's equipped.
Thanks in advance, have a nice day
 
X

XJ_Dan

Guest
This is what the image_index variable is for.
Thank you for the reply! I tried this, I made a global variable that activates once the weapon is equipped. And in my player obj I set the image_index to 0 and the image speed to .3 when it's active but this causes the main characters animation to freeze on one frame.
 
Top