# How to get the device when callback is called?

**URL:** <https://forums.unrealengine.com/t/how-to-get-the-device-when-callback-is-called/1321233>\
**Category:** Verse\
**Tags:** fortnite-creative, unreal-editor-for-fortnite, question, fortnite\
**Created:** [October 3, 2023, 3:46pm UTC](https://forums.unrealengine.com/t/how-to-get-the-device-when-callback-is-called/1321233 "2023-10-03T15:46:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [October 4, 2023, 10:30am UTC](https://forums.unrealengine.com/t/how-to-get-the-device-when-callback-is-called/1321233/4 "2023-10-04T10:30:59Z")

</div>

Hey, yes it’s not supported yet, as GraemeBB said, you can take a look at handlers [Guide to Event Subscribing with Additional Parameters (Handler Functions)](https://forums.unrealengine.com/t/guide-to-event-subscribing-with-additional-parameters-handler-functions/793925)

You can either use an handler class like this

```auto
# Handler for a button InteractedWithEvent but could be used for any listenable requiring a (agent -> void) signature
on_prop_pickedup_function := type{_(:agent, :int) : void}
pickup_prop_button_handler := class:
    AdditionalData: int
    Callback: on_prop_pickedup_function

    HandleInteractedWithEvent(Agent:agent):void=
        Callback(Agent, AdditionalData)

```

Or you could use spawn as a quick lightweight solution

```auto
for (CaptureDevice : CaptureDevices):
    spawn{WaitForZoneToBeCaptured(CaptureDevice)}

WaitForZoneToBeCaptured(CaptureDevice : capture_area_device)<suspends>:void=
    loop:
        Agent := CaptureDevice.ControlChangeEvent.Await()
        # Agent is the new owner

```

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-get-the-device-when-callback-is-called/1321233)._
