# Add a macro for merging/redirecting multiple input execs to one output

**URL:** <https://forums.unrealengine.com/t/add-a-macro-for-merging-redirecting-multiple-input-execs-to-one-output/418950>\
**Category:** Cinematics & Media\
**Tags:** macro-library, unreal-engine, FeatureRequest, sequence, question\
**Created:** [March 4, 2018, 5:20pm UTC](https://forums.unrealengine.com/t/add-a-macro-for-merging-redirecting-multiple-input-execs-to-one-output/418950 "2018-03-04T17:20:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_04f32a061](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_04f32a061](https://forums.unrealengine.com/u/anonymous_user_04f32a061)\
**Post date:** [March 4, 2018, 5:20pm UTC](https://forums.unrealengine.com/t/add-a-macro-for-merging-redirecting-multiple-input-execs-to-one-output/418950/1 "2018-03-04T17:20:37Z")

</div>

I stumble several times over an interesting situations, most of you will know: different events require very similiar handling.  
A common problem would be an increment/decrement combination, e. g. the click events of a plus and minus button – sometimes this is easy (just an arithmetic operation, the rest is equal for both events), but sometimes large parts of the following graph distinguish all over in just a tiny variable, often a `bool` ( `true` at the first event, `false` at the second), and sometimes the beginning of the handling is equal.

Like in the following simplified example:

 ![232713-situation.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/b/f8bf372c585b360c76060b07ebe2cd9663252a4e.jpeg)

When you want to avoid code duplication and do not want to create an extra function, the one and only (?) solution is to introduce a variable:

 ![232714-workaround.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/9/4e9d376f631d6a185e51186b34c5962b300d9ee5.jpeg)

My suggestion is to automate this by a macro I call `MergeExecs`, that uses a wildcard.

 ![232715-new-macro.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/a/9fa203932c4dd52cc8af0b8f54f91906cc87466b.jpeg)

No it’s really simple:

 ![232716-request.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/2/622ed17854bbfd5022e2fe3ce9d171c6e0ef60c2.jpeg)

There is only one problem: You can only merge two execution pins. Of course, you can just successively repeat the new macro, but it would be great if you could just add more execution/value combinations by a small plus button (similiar to the add float function).

What do you think of this idea? Isn’t it annoying that such a macro is missing?

---

<div class="post-metadata">

**Author:** ![DuneGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dunegames/32/538495_2.png) [@DuneGames](https://forums.unrealengine.com/u/DuneGames)\
**Post date:** [February 9, 2023, 9:51pm UTC](https://forums.unrealengine.com/t/add-a-macro-for-merging-redirecting-multiple-input-execs-to-one-output/418950/2 "2023-02-09T21:51:36Z")

</div>

This is cool - thanks. I agree, a standard macro with a + would be great!
