How do I bind two separate animations to the same key

  1. Go to EditProject Settings…
  2. EngineInput
  3. Add new Action Mapping. Use bound to Left Mouse Button
  4. Add new Action Mapping. Swap bound to Q
  5. On Q set a variable UseDrill
  6. Then in your Use event, branch for UseDrill to use the drill, and when false, do the other action you want it to do.

Use Drill should only be set in the Swap event.

All Swap should be doing is setting Use Drill to the value of NOT Use Drill.

No problem man.

You need to feed a reference to Use Drill into the NOT

Did you ever have that working?

Right now the logic is implemented where you can toggle what the Attack input does.

Yes, now you will be able to do this on the False pin of that Branch.

No problem, happy to help.

Because the default value of a boolean is False. Click on the variable Use Drill in the left side panel, then on the right side panel you’ll see all its details, at the bottom is the default value… Check the checkbox to make its initial value True.

I’ve been using Unreal for a bit (ver. 4.14), but just now getting into setting up my own project. It’s Third-Person, with a drill in one hand, and a gun in the other.
To simplify the combat, I’m trying to use the key ‘Q’ to swap the (left mouse button) keybinding between drill and gun.

Here is the ‘before’ image, where the drill melee was working just fine:

And here is the ‘after’ image, where neither the drill melee nor the gun animation were firing off:

I’d really appreciate any help I can get. I have a feeling that I’m missing something simple, as I’m very slowly getting more familiar with the node system.

Thank you in advance!

‘Q’ is definitely doing something now. However, it isn’t running the gunfire animation. Also, the animation’s been delayed much more, as if the delay was somehow multiplied. I’m confident that your advice was sound, so I must be doing something wrong here.

Sorry, man. I’m doing my best to follow you, and making sure I’ve exhausted what I know to do before commenting again. I cleaned it up a bit, and removed the set ‘use drill’ from everything except swap.

I think something’s missing from the false of the branch to the gunfire anim montage. As it is now, when I press Q, the drill stops working. That’s awesome, because that’s what I want. But the gunfire animation still isn’t firing off.

No, I haven’t had it working in this setup. Eventually, I’d like to be able to press left click to use the drill, as well as the gun–switching between the two with ‘Q’. If I’m understanding you correctly, now that it’s set up this way, I should be able to make that happen with some tweaking.

Looks like everything’s working, thank you for your time! :slight_smile:

On a side note, any chance you know why it’s defaulting to the false (gun anim montage)? Not a big deal, as Q successfuly switches between the two now.

Woohoo! Success. I’m a happy camper.