# How do I find out what was passed in my tuple?

**URL:** <https://forums.unrealengine.com/t/how-do-i-find-out-what-was-passed-in-my-tuple/1314702>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [September 27, 2023, 9:36pm UTC](https://forums.unrealengine.com/t/how-do-i-find-out-what-was-passed-in-my-tuple/1314702 "2023-09-27T21:36:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDadXI](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thedadxi/32/768546_2.png) [@TheDadXI](https://forums.unrealengine.com/u/TheDadXI)\
**Post date:** [September 27, 2023, 9:36pm UTC](https://forums.unrealengine.com/t/how-do-i-find-out-what-was-passed-in-my-tuple/1314702/1 "2023-09-27T21:36:06Z")

</div>

Specifically, using the shooting\_range\_target\_device & HitEvent, how can I tell what the object are in the tuple passed in on the event?

---

<div class="post-metadata">

**Author:** ![TheDadXI](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thedadxi/32/768546_2.png) [@TheDadXI](https://forums.unrealengine.com/u/TheDadXI)\
**Post date:** [September 27, 2023, 9:45pm UTC](https://forums.unrealengine.com/t/how-do-i-find-out-what-was-passed-in-my-tuple/1314702/2 "2023-09-27T21:45:41Z")

</div>

target is a shooting\_range\_target\_device & Lock is a lock\_device

```auto
target.HitEvent.Subscribe(onTargetHit);
...
    onTargetHit(Data : tuple()):void={
            if(Agent := agent[Data(0)]){ <-- This line does not compile.
                Lock.Unlock(Agent)

            }
    }

```

Error:

> Dynamic cast $unknown to `agent`: argument type `$unknown` must be a class.

---

<div class="post-metadata">

**Author:** ![TheDadXI](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thedadxi/32/768546_2.png) [@TheDadXI](https://forums.unrealengine.com/u/TheDadXI)\
**Post date:** [September 28, 2023, 10:41am UTC](https://forums.unrealengine.com/t/how-do-i-find-out-what-was-passed-in-my-tuple/1314702/3 "2023-09-28T10:41:46Z")

</div>

Turns out that an empty tuple() definition mean nothing is passed in it. 😕

What I needed was the use of a Trigger device linked to the Target’s Hit Event and _then_ I’d have access to the Agent… However, I also hit an issue with the optional / nullable parameter `?agent` that was passed in…

I found my answer to that here: [How do i convert from type ?agent to agent... im so confused with optionals - #3 by Twin01](https://forums.unrealengine.com/t/how-do-i-convert-from-type-agent-to-agent-im-so-confused-with-optionals/1258390/3)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 28, 2023, 10:42am UTC](https://forums.unrealengine.com/t/how-do-i-find-out-what-was-passed-in-my-tuple/1314702/4 "2023-10-28T10:42:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
