# How do I bind two separate animations to the same key

**URL:** <https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966>\
**Category:** Character & Animation\
**Tags:** keybindings, unreal-engine, nodes, question, Blueprint\
**Created:** [June 19, 2017, 8:15pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966 "2017-06-19T20:15:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lauterdale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lauterdale](https://forums.unrealengine.com/u/Lauterdale)\
**Post date:** [June 19, 2017, 8:15pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/1 "2017-06-19T20:15:00Z")

</div>

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:

 ![200888-before.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/e/69e857177082f84ea6c63b4be98a258d57d54c5a.png)

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

 ![200889-after.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/2/322457098a583b538fcee06d190a1e6515d2d9b1.png)

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!

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [June 19, 2017, 9:42pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/2 "2017-06-19T21:42:27Z")

</div>

1. Go to **Edit** → **Project Settings…**
2. **Engine** → **Input**
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.

---

<div class="post-metadata">

**Author:** ![Lauterdale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lauterdale](https://forums.unrealengine.com/u/Lauterdale)\
**Post date:** [June 19, 2017, 10:34pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/3 "2017-06-19T22:34:10Z")

</div>

‘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.

 ![200900-after2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/7/027f29413141ac66483c0a49b1b3c6b4b228a0b8.png)

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [June 19, 2017, 11:11pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/4 "2017-06-19T23:11:53Z")

</div>

`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`.

---

<div class="post-metadata">

**Author:** ![Lauterdale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lauterdale](https://forums.unrealengine.com/u/Lauterdale)\
**Post date:** [June 20, 2017, 12:21am UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/5 "2017-06-20T00:21:45Z")

</div>

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.

 ![200911-after3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/b/30b6c7ef191d788800c592d826d32a745ad16526.png)

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [June 20, 2017, 3:48am UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/6 "2017-06-20T03:48:04Z")

</div>

No problem man.

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

---

<div class="post-metadata">

**Author:** ![Lauterdale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lauterdale](https://forums.unrealengine.com/u/Lauterdale)\
**Post date:** [June 20, 2017, 4:35am UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/7 "2017-06-20T04:35:01Z")

</div>

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.

 ![200922-after4.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/2/2f2dfb843c63ba39f73181465d36a37dfa3587ab.png)

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [June 20, 2017, 4:43am UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/8 "2017-06-20T04:43:06Z")

</div>

Did you ever have that working?

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

---

<div class="post-metadata">

**Author:** ![Lauterdale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lauterdale](https://forums.unrealengine.com/u/Lauterdale)\
**Post date:** [June 20, 2017, 5:10am UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/9 "2017-06-20T05:10:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [June 20, 2017, 8:31am UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/10 "2017-06-20T08:31:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lauterdale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lauterdale](https://forums.unrealengine.com/u/Lauterdale)\
**Post date:** [June 20, 2017, 4:42pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/11 "2017-06-20T16:42:13Z")

</div>

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

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.

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [June 20, 2017, 6:00pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/12 "2017-06-20T18:00:11Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![Lauterdale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lauterdale](https://forums.unrealengine.com/u/Lauterdale)\
**Post date:** [June 20, 2017, 6:19pm UTC](https://forums.unrealengine.com/t/how-do-i-bind-two-separate-animations-to-the-same-key/398966/13 "2017-06-20T18:19:43Z")

</div>

Woohoo! Success. I’m a happy camper.
