# Using other classes events

**URL:** <https://forums.unrealengine.com/t/using-other-classes-events/1315008>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, fortnite\
**Created:** [September 28, 2023, 5:07am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008 "2023-09-28T05:07:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremy\_Choud](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jeremy_choud/32/907645_2.png) [@Jeremy\_Choud](https://forums.unrealengine.com/u/Jeremy_Choud)\
**Post date:** [September 28, 2023, 5:07am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/1 "2023-09-28T05:07:51Z")

</div>

Anybody know of a way to access other public classes Events?

for instance i have lets say :

Class1 := class(creative\_device):

```
  ExampleEvent : event() = event(){}

  OnBegin<override>()<suspends>:=void=

          ExampleEvent.Signal()

```

and then from another device/class i would like to figure out how await that events signal. Thought it would be something like this but having no luck

Class2 := class(creative\_device):

```
  OnBegin<override>()<suspends>:=void=

           Class1.ExampleEvent.Await()

```

---

<div class="post-metadata">

**Author:** ![LoPing](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loping/32/737300_2.png) [@LoPing](https://forums.unrealengine.com/u/LoPing)\
**Post date:** [September 28, 2023, 5:12am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/2 "2023-09-28T05:12:54Z")

</div>

Do you mean like this…

```auto
@editable
HUDupdate : dynamic_text_device = dynamic_text_device{}
...
# in code...
 HUDupdate.someFunction()
```

…or am I misunderstanding?

---

<div class="post-metadata">

**Author:** ![Jeremy\_Choud](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jeremy_choud/32/907645_2.png) [@Jeremy\_Choud](https://forums.unrealengine.com/u/Jeremy_Choud)\
**Post date:** [September 28, 2023, 5:21am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/3 "2023-09-28T05:21:34Z")

</div>

I want to access the await function of the event from a different class so that when it’s signaled in my other class the function awaiting the signal can proceed.

---

<div class="post-metadata">

**Author:** ![LoPing](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loping/32/737300_2.png) [@LoPing](https://forums.unrealengine.com/u/LoPing)\
**Post date:** [September 28, 2023, 5:25am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/4 "2023-09-28T05:25:30Z")

</div>

If the function is ‘listenable’, you can generally do so with something like…

```auto
AnotherDevice.SomeListenableEvent.Subscribe(MyLocalEventHandler)
```

---

<div class="post-metadata">

**Author:** ![Jeremy\_Choud](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jeremy_choud/32/907645_2.png) [@Jeremy\_Choud](https://forums.unrealengine.com/u/Jeremy_Choud)\
**Post date:** [September 28, 2023, 5:27am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/5 "2023-09-28T05:27:21Z")

</div>

will play around with that. Thank you

---

<div class="post-metadata">

**Author:** ![PiEqualsThree3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PiEqualsThree3](https://forums.unrealengine.com/u/PiEqualsThree3)\
**Post date:** [September 28, 2023, 6:20am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/6 "2023-09-28T06:20:40Z")

</div>

You still would need an instance of Class1 or someway to pass the ExampleEvent to Class2 to be able to call Await() on it.

```auto
Class2 := class(creative_device):
    Class1Instance : Class1 = Class1{}
    
    OnBegin<override>()<suspends>:void=
           Class1Instance.ExampleEvent.Await()

```

---

<div class="post-metadata">

**Author:** ![Jeremy\_Choud](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jeremy_choud/32/907645_2.png) [@Jeremy\_Choud](https://forums.unrealengine.com/u/Jeremy_Choud)\
**Post date:** [September 28, 2023, 8:32am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/7 "2023-09-28T08:32:29Z")

</div>

Thank you for this one.

Adding @editable if you’re only ever using 1 instance of the class keeps it from creating an unnecessary extra instance too!

Much appreciated!

---

<div class="post-metadata">

**Author:** ![Mapshot\_Agency](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mapshot_agency/32/700660_2.png) [@Mapshot\_Agency](https://forums.unrealengine.com/u/Mapshot_Agency)\
**Post date:** [September 28, 2023, 10:40pm UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/8 "2023-09-28T22:40:42Z")

</div>

Can we already make our own listenable events? I thought this wasn’t available yet?

---

<div class="post-metadata">

**Author:** ![Jeremy\_Choud](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jeremy_choud/32/907645_2.png) [@Jeremy\_Choud](https://forums.unrealengine.com/u/Jeremy_Choud)\
**Post date:** [October 1, 2023, 1:04am UTC](https://forums.unrealengine.com/t/using-other-classes-events/1315008/9 "2023-10-01T01:04:40Z")

</div>

I’ve used them once or twice in the same class but never across multiple before.

The syntax is pretty simple

But you could do something simple like

```
EventName : event() = event(){}
var x : int = 0 

OnBegin<override>()<suspends>:void=
    CheckInt()
    branch:
        WaitingForEvent()

CheckInt():void=
    if(x > 2):
        random expression
        random expression 
        EventName.Signal()

WaitingForEvent()<suspends>:void=
    EventName.Await()
    #whatever you want to happen after the event is signaled

```

Or if you want to access it from another class do what PiEqualsThree Said and create an instance of the class you want to reference it from in the class you’re working in and then you can await the signal in other places too! 🙂
