Hello, I’m working on a menu, and I have 2 sub-menu’s in that menu. There is an int inside the first one called “targetIndex”, but I would like the second sub menu to be able to set it when a button is clicked. I can’t find a way to access a variable outside of the subMenu a button is in though - I would love any advice on the topic, thank you for your time!
Here’s a video demonstration of my problem:
You’ll need to make an Event Dispatcher in your submenu widget, then call it when you click a button. Then in the other (parent) menu, bind that dispatcher to an event/function.
For example, I have an Event Dispatcher called Clicked on a Custom Button Widget. It has an Input of type Integer called ID (To identify a specific button, when there are multiple in a list or something).

I then call the Dispatcher when the button gets clicked

Now in another widget, I can add this custom button widget and then bind the Clicked Dispatcher like a regular button.

So, in your case I would create a single Dispatcher with an Integer Input for targetindex. Call that dispatcher on each button’s clicked event with the appropriate targetindex. Then in the first widget, you can use this dispatchers event to set targetindex.
Index would be the value that you want iPoseIndex to be set to.
Now when you select the submenu widget in main menu, on the details panel at the bottom, there should be an event called SetIndex (like clicked, pressed etc… for buttons). Click + on that SetIndex Event to add it to the graph. This SetIndex event will get called when you call the SetIndex dispatcher on the submenu. Then you can use this event to set iPoseIndex
You called it in your previous reply

OMG IT WORKED!!!
Thank you so much for your help, my question has been answered, you are awesome!!!
Hope you have a Fantastic Day!!!
