# Call a custom event iin random blueprint actor type from another blueprint actor.

**URL:** <https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [April 23, 2016, 1:12am UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947 "2016-04-23T01:12:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [April 23, 2016, 1:12am UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/1 "2016-04-23T01:12:36Z")

</div>

I’m not sure if this is possible, so I figured I’d ask.

Let’s assume I have three actors.

blueprintSpecialEffect  
blueprintHuman  
blueprintOrc

My goal is to have blueprintHuman or blueprint Orc spawn blueprintSpecialEffect, blueprintSpecialEffect will then perform an action, and once this action is completed tell the creator blueprint(blueprintHuman or blueprintOrc) so.

I know you can pass an actor reference and then call a custom event in that actor but this will not work because I’ll be creating blueprintSpecialEffect from many different actor types.

I could use a generic actor reference but then I would have to cast to xxxxx before calling the custom event. This may work but would be a lot of extra work and not very ideal.

Is there a better way to do this?

To give you an idea of what scenario I would like to use this in …  
blueprintHuman dies in game, blueprintSpecialEffect does some fancy animation(let’s ignore the fact we’d do this other ways since this is just an example), once fancy animation ends a call is made to blueprintHuman informing it that the animation finished, and that blueprintHuman may be destroyed(or other actions).

---

<div class="post-metadata">

**Author:** ![xintoc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xintoc](https://forums.unrealengine.com/u/xintoc)\
**Post date:** [April 23, 2016, 10:21am UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/2 "2016-04-23T10:21:11Z")

</div>

By many different actor types you mean what?

---

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [April 23, 2016, 9:26pm UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/3 "2016-04-23T21:26:12Z")

</div>

> [@xintoc;518172](#):
>
> By many different actor types you mean what?

Lets say I have three different blueprints. Each blueprint is spawned at random (so not static to the level). One of these blueprints might spawn another blueprint, telling it to complete an action. Once said action is complete the first blueprint should perform it’s own action.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 23, 2016, 10:12pm UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/4 "2016-04-23T22:12:06Z")

</div>

Have you looked into [Event Dispatchers](https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/EventDispatcher/index.html)?

---

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [April 24, 2016, 3:58am UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/5 "2016-04-24T03:58:32Z")

</div>

> [@Everynone;518435](#):
>
> Have you looked into [Event Dispatchers](https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/EventDispatcher/index.html)?

I have, and I’ve read so many articles on them. I’ve used similar techniques in C# but I can’t seem to understand how to call an event dispatcher to a unique blueprint from another spawned blueprint.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 24, 2016, 8:32am UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/6 "2016-04-24T08:32:01Z")

</div>

The _SpecialEffect BP_ will inform the _Orc BP_ that something has happened. Every time you _PlayTheSpecialEffect_, it will broadcast the \*Result \*message to \*\*anything \*\*that is listening.

1. Perform the action
2. Call the Dispatcher

 ![96ecdfe7df5d1cc18ab23c7b372932470fb2546b.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/e/96ecdfe7df5d1cc18ab23c7b372932470fb2546b.jpeg)

The issue is that no Orcs are listening atm. Lets fix that.

1. The Orc is about to die
2. We’ll spawn the SpecialEffect to demonstrate its demise
3. Make the Orc \*listen \*to any potential Dispatcher messages, whenever they happen
4. Play the Special Effect which will fire the Orc’s bound custom event

 ![SpecialEffect.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/e/96ecdfe7df5d1cc18ab23c7b372932470fb2546b.jpeg)

---

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [April 24, 2016, 4:43pm UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/7 "2016-04-24T16:43:40Z")

</div>

> [@Everynone;518587](#):
>
> …

Think I understand now. Will test it when I’m able to and let you know. Thanks.

---

<div class="post-metadata">

**Author:** ![Distul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Distul](https://forums.unrealengine.com/u/Distul)\
**Post date:** [April 27, 2016, 4:36pm UTC](https://forums.unrealengine.com/t/call-a-custom-event-iin-random-blueprint-actor-type-from-another-blueprint-actor/61947/8 "2016-04-27T16:36:09Z")

</div>

> [@Everynone;518587](#):
>
> …

Just wanted to let you know event dispatchers worked perfectly. Thank you.
