# listenable Interfaces/Functions Should Pass this as the First Argument

**URL:** <https://forums.unrealengine.com/t/listenable-interfaces-functions-should-pass-this-as-the-first-argument/1206712>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, fortnite\
**Created:** [June 21, 2023, 9:42pm UTC](https://forums.unrealengine.com/t/listenable-interfaces-functions-should-pass-this-as-the-first-argument/1206712 "2023-06-21T21:42:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DustinREDGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dustinredgames/32/634988_2.png) [@DustinREDGames](https://forums.unrealengine.com/u/DustinREDGames)\
**Post date:** [June 21, 2023, 9:57pm UTC](https://forums.unrealengine.com/t/listenable-interfaces-functions-should-pass-this-as-the-first-argument/1206712/2 "2023-06-21T21:57:26Z")

</div>

I agree more info passed would be extremally helpful. But for now, you can create a callback handler class that passes the additional references you need to what device triggered the event. Something like this: (untested!)

```auto
# custom callback handler that passes the device that triggered the event
CustomCallbackHandler := class():
    Manager : test_callback_device 
    Device : vehicle_spawner_device
    HandlerFunction(Agent:agent):void=
        Manager.OnEventTriggered(Agent, Device)

test_callback_device := class(creative_device):

    @editable
    Devices : []vehicle_spawner_device = array{}

    OnBegin<override>()<suspends>:void=
        for(X -> Device : Devices):
            # pass reference to callback 
Device.AgentExitsVehicleEvent.Subscribe(CustomCallbackHandler{Manager:=Self, Device:=Device}.HandlerFunction)

    OnEventTriggered(Agent:agent, Device:vehicle_spawner_device):void=
        # do something....

```

---

_[View the full topic](https://forums.unrealengine.com/t/listenable-interfaces-functions-should-pass-this-as-the-first-argument/1206712)._
