I'm currently working on a map where i want to display a integer variable in a Dialog box. For some reason i just cant seem to figure out how to do it. Is there a simple solution and I'm a noob or is this just not possible.
I'm currently working on a map where i want to display a integer variable in a Dialog box. For some reason i just cant seem to figure out how to do it. Is there a simple solution and I'm a noob or is this just not possible.
you need to create a dialog item label which will contain the text.
Create Dialog Item Label.
Set Dialog Item Text (Last Created Dialog Item, variable);
you might need to use conversion to get the variable displayed.
Edit: moved to Triggers forum, the UI forum is for UI Layout questions, not for Dialog questions.
On top of that everytime variable is changed you need to refresh label by again doing Set Dialog Item Text (Last Created Dialog Item, variable). In this case you will have to save "Last Created Dialog Item" in some global variable
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm currently working on a map where i want to display a integer variable in a Dialog box. For some reason i just cant seem to figure out how to do it. Is there a simple solution and I'm a noob or is this just not possible.
DialogControlSetPropertyAsText (dialogItem, c_triggerControlPropertyText, playergroup, text);
Edit: You could always just create a little function to output text for troubleshooting and development -
void Print(string s) { UIDisplayMessage(PlayerGroupAll(), 1, StringToText(s)); }
Print("Hello World");
you need to create a dialog item label which will contain the text.
Create Dialog Item Label.
Set Dialog Item Text (Last Created Dialog Item, variable);
you might need to use conversion to get the variable displayed.
Edit: moved to Triggers forum, the UI forum is for UI Layout questions, not for Dialog questions.
On top of that everytime variable is changed you need to refresh label by again doing Set Dialog Item Text (Last Created Dialog Item, variable). In this case you will have to save "Last Created Dialog Item" in some global variable