# How do I use RespondingButtonEvent for a Popup Dialog Device?

**URL:** <https://forums.unrealengine.com/t/how-do-i-use-respondingbuttonevent-for-a-popup-dialog-device/1216686>\
**Category:** Verse\
**Tags:** unreal-engine, unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [July 1, 2023, 8:54pm UTC](https://forums.unrealengine.com/t/how-do-i-use-respondingbuttonevent-for-a-popup-dialog-device/1216686 "2023-07-01T20:54:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KiansDojo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KiansDojo](https://forums.unrealengine.com/u/KiansDojo)\
**Post date:** [July 1, 2023, 8:54pm UTC](https://forums.unrealengine.com/t/how-do-i-use-respondingbuttonevent-for-a-popup-dialog-device/1216686/1 "2023-07-01T20:54:18Z")

</div>

![Schermafbeelding 2023-07-01 220440](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/9/6b9de805c7d2279abf258fc76f722999040ed88d.png)

My goal is to teleport the player once the first button response is pressed. What verse code do I need to type with RespondingButtonEvent in order to do that? Thanks in advance.

---

<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:** [July 2, 2023, 11:07am UTC](https://forums.unrealengine.com/t/how-do-i-use-respondingbuttonevent-for-a-popup-dialog-device/1216686/2 "2023-07-02T11:07:07Z")

</div>

I think you can do :

```auto
# Put that somewhere in your code (OnBegin for example)
PopupDialog.RespondingButtonEvent.Subscribe(OnPopupButtonClicked)

OnPopupButtonClicked(Agent: agent, Index: int):void =
    if(Index = 0): # Try with 1 if it doesn't work
        MyTeleporter.Teleport(Agent)

```

---

<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:** [August 1, 2023, 11:07am UTC](https://forums.unrealengine.com/t/how-do-i-use-respondingbuttonevent-for-a-popup-dialog-device/1216686/3 "2023-08-01T11:07:35Z")

</div>

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