I've hit a snag in the map I'm trying to build. I have a trigger running when a screen button is pressed, but within the trigger how can I reference the screen button's index? I'm dynamically creating the screen buttons and I need to be able to store the index of the specific screen button that was pressed.
There isn't much documentation on screen buttons. I have not seen many people in the community play around with them. Most people will make their own "Dialogs". I'll go play around with screen buttons and I'll get back to ya.
Seams like each screen button is set to a specific "Trigger". Very interesting stuff. Do you have it setup 1 trigger each or all into 1 trigger and you want to filter which was used?
They all reference 1 trigger and that trigger does different things based on several variables.
I actually got a solution going for this. Helral in the UI Development forum informed me that you can "Set Edit Value" on the buttons as they're created, and then get that value from the trigger to find out which button was actually pressed. This has made it incredibly easy to generate a ton of buttons through loops without actually cluttering up the code with each button's definition.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
I've hit a snag in the map I'm trying to build. I have a trigger running when a screen button is pressed, but within the trigger how can I reference the screen button's index? I'm dynamically creating the screen buttons and I need to be able to store the index of the specific screen button that was pressed.
Thanks so much in advance!
There isn't much documentation on screen buttons. I have not seen many people in the community play around with them. Most people will make their own "Dialogs". I'll go play around with screen buttons and I'll get back to ya.
Seams like each screen button is set to a specific "Trigger". Very interesting stuff. Do you have it setup 1 trigger each or all into 1 trigger and you want to filter which was used?
They all reference 1 trigger and that trigger does different things based on several variables.
I actually got a solution going for this. Helral in the UI Development forum informed me that you can "Set Edit Value" on the buttons as they're created, and then get that value from the trigger to find out which button was actually pressed. This has made it incredibly easy to generate a ton of buttons through loops without actually cluttering up the code with each button's definition.