Is this possible? I'm a little new so if you need any more info please ask.
Let me explain. I have an array of data that is referenced throughout my map and each item is referred to by an integer value in the array. I initialize screen buttons with this as well. But! I can't check which screen button (and therefore data value) was pressed. It seems that the "Used dialog item" can tell me which screen button activated it, but when I want to look up data from my array I cannot convert that "Used dialog item" value to an integer.
Basically I want to see which screen button (int) triggered the trigger.
if I remember correctly you can set a custom value for your dialog items, which you can use to store an integer as a string value. and when retrieving it you can convert it back to an integer. think it was something like "Set Dialog Item (Custom) Value" and "Get Dialog Item (Custom) Value".
Are you talking about "Dialog item edit value"? That function returns a string from a dialog item, as you said. But what I'm trying to get is the screen button's identifier. I don't believe it is returning that, it gives me an error that it can't convert the int to string (currently zero).
Internally, a dialog is an integer. If there is no native function to convert a dialog in an integer, you can create it yourself by creating a new function taking a dialog and returning an integer, then add a line of custom script, which returns the parameter.
So, what I'm looking for is the screen button identifier of the screen button that was pressed. It isn't a "Dialog Item - Button." I'm using the Create Screen Dialog function to create these buttons.
The step I was missing was setting the edit value on the screen button. I just set it to the same index value as the identifier and it works perfectly. Thanks so much!
Hello,
Is this possible? I'm a little new so if you need any more info please ask.
Let me explain. I have an array of data that is referenced throughout my map and each item is referred to by an integer value in the array. I initialize screen buttons with this as well. But! I can't check which screen button (and therefore data value) was pressed. It seems that the "Used dialog item" can tell me which screen button activated it, but when I want to look up data from my array I cannot convert that "Used dialog item" value to an integer.
Basically I want to see which screen button (int) triggered the trigger.
Thanks in advance!
@crucial99: Go
if I remember correctly you can set a custom value for your dialog items, which you can use to store an integer as a string value. and when retrieving it you can convert it back to an integer. think it was something like "Set Dialog Item (Custom) Value" and "Get Dialog Item (Custom) Value".
Hey, thanks for the reply!
Are you talking about "Dialog item edit value"? That function returns a string from a dialog item, as you said. But what I'm trying to get is the screen button's identifier. I don't believe it is returning that, it gives me an error that it can't convert the int to string (currently zero).
Thanks so much for replying.
Internally, a dialog is an integer. If there is no native function to convert a dialog in an integer, you can create it yourself by creating a new function taking a dialog and returning an integer, then add a line of custom script, which returns the parameter.
So, what I'm looking for is the screen button identifier of the screen button that was pressed. It isn't a "Dialog Item - Button." I'm using the Create Screen Dialog function to create these buttons.
@crucial99: Go
I knew what I said was possible, see attached map.
This is great! Thank you so much!
The step I was missing was setting the edit value on the screen button. I just set it to the same index value as the identifier and it works perfectly. Thanks so much!