Download

Different Animations for Equipped Weapon

Hi there, I’m fairly new to UE4 and I’m struggling with an issue I’ve come across with animations. I currently have the player walking around, running, jumping, crawling, punching etc. I also have a baseball bat in the scene that he can pick up, and equip/unequip at the press of a button. What I’d like to know is how to have a different animations depending on whether he’s equipped the weapon or not.

In the level blueprint I have told it that when the actor overlaps a particular trigger box, the bat is picked up (unequipped), and can be equipped with Q. That all works fine. However I can’t reference the level blueprints in the character blueprint when I tell it, “btw when you’re holding the bat you have to play a different animation” so I had to make another blueprint for the triggerbox to say “when the player enters, the bat has been collected” and then in the character blueprint I’ve told it “if the bat has been collected, it will be equipped with this button” and in the animation event graph I’ve said “if it’s equipped and the player punches, you play the bat swing animation”

5018062f4342d0acb68987faecaded3ceebc63b1.png
2. Triggerbox Blueprint.PNG
3. Character Blueprint.PNG
One particular problem I’ve found is that I don’t know what to drag out of the object part of the Cast Triggerbox Blueprint, is it the player? the triggerbox?
4. Animation Event Graph.PNG
d8d062112558317a3a5fb97ba171ee55c9a8cf95.png

Any help would be appreciated, I’ve been pulling my hair out over this for two days.

Thanks,
Matt

Trying to figure out the same thing, no help here either. Slow year in the help section.

OK I’ll take a shot at it.

The available tutorials do a very good job of explaining key concepts as to making a player model move but once you have a need to expand the level of complexity it gets harder and even impossible to respond with a defaco solution to the problem as you are moving into an area unique to your project and design requirements.

To kind of fill in that gap I did this.

https://www.youtube.com/watch?v=BC1b_IPHWOo&feature=youtu.be

To suggest that if you find yourself painted into a corner it’s the design telling you that you might what to rethink your current approach as to how you can expand the design so that it can scale as to “your” unique requirements.

P.S. Excuse the run on at the end as no point in editing for any kind of production value. :smiley: