As I just mentioned in someone else's post, you want the ui editor if you are working with abilities. Diplaying cooldowns on an icon is a bit of an annoyance. The ui editor can give you everything you want with far less effort put in. I'd suggest talking with the people above about the ui editor. I know there are many tutorials for moving abilities around. I've done it myself, with the tutorials on this site. Took me about 5-6 hours to figure out how stuff worked. I'm sure the pros can do it in 15 min.
Quote from BigDonRob:
So wait. Should I simply hide the dialogue and just SHOW it each time?
----
yes, absolutely.
Dialog - Create a Modal dialog of size (335, 320) at (50, 200) relative to Bottom Right of screen
Dialog - Show (Last created dialog) for (All players)
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-zergling.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\ui_hots_border_shared_01.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 0) with the text {"Level "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 50) with the text {"Amount Per Wave "(Text((Value 1 * Value 2)))} color set to Automatic text writeout set to False with a writeout duration of 2.0
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 100) with the text {"Enemy Zerglings Killed "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
Take that, and put it in a map initialization trigger, so it is made when the map loads. Then, anything on it you wish to change (the text) set to a global variable of type "dialog item" So it should look like this:
Dialog - Create a Modal dialog of size (335, 320) at (50, 200) relative to Bottom Right of screen
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG" = LAST CREATED DIALOG***************
Dialog - Show (Last created dialog) for (All players)
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-zergling.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\ui_hots_border_shared_01.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 0) with the text {"Level "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG ITEM[ARRAY 1]" = LAST CREATED DIALOG ITEM***************
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 50) with the text {"Amount Per Wave "(Text((Value 1 * Value 2)))} color set to Automatic text writeout set to False with a writeout duration of 2.0
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG ITEM[ARRAY 2]" = LAST CREATED DIALOG ITEM***************
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 100) with the text {"Enemy Zerglings Killed "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG ITEM[ARRAY 3]" = LAST CREATED DIALOG ITEM***************
Then, you can show and hide the dialog by referencing the variable; and you can change the text by referencing the variables of the dialog items.
You dont want to be destroying and creating dialogs every time you need to update them; this is going to suck a lot of power outta your game. you can simple set the dialog item "text" to a variable. Then you can use the trigger "Set dialog item text" and reference that variable, to alter the text of the dialog item.
With something as simple as updating a single line of text on a dialog, you can run it every .1 second for the entire game, and it shouldnt cause any lag (though i absolutely wouldnt recommend it).
It would be insanely helpful if you told me what it was updating. Since you say that it is displaying a number you have saved into a variable, every time you update that variable, you can update the dialog text. This is the absolute best way to do it; and very easy to implement. Every time you modify the variable, just add, "Set dialog item text (Dialog item variable) = convert integer (variable) to text"
***Edit*** I forgot to mention, UI and dialogs are different. There is an actual UI editor, which the people above are trying to help you with. That alters the game UI. It is much more difficult (in my opinion) than creating dialogs. Though there is some stuff UI can do that isn't as viable through dialogs.
I dont do any UI editing; but I do a lot of dialog work to make my own UI like stuff. Considering you are setting values for this box with triggers anyway, why not just make a dialog box and use the triggers to update said dialog box?
More specifically, say what you want in the long run, so we can show you other ways of getting there. If what you want is an icon on the screen with a number on it reflecting a variable, yes, use a dialog box. This is 5 minutes worth of work.
Dialog - Create a Modal dialog of size (335, 320) at (-20, 140) relative to Right of screen
Variable - Set Help Dialog Buttons - Dialog Box = (Last created dialog)
Dialog - Show (Last created dialog) for (All players)
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions ((X Size - 10), (Y Size - 10)) anchored to Top Left with an offset of ((X Pos + 5), (Y Pos + 5)) setting the tooltip to "" using the image Temp Image[index] as a Normal type with tiled set to False tint color (100%, 100%, 100%) and blend mode Normal
Variable - Set Help Dialog Buttons - Dialog Items[index][2] = (Last created dialog item)
Dialog - Create an image for dialog (Last created dialog) with the dimensions ((X Size - 0), (Y Size - 0)) anchored to Top Left with an offset of ((X Pos + 0), (Y Pos + 0)) setting the tooltip to "" using the image Assets\Textures\ui_multiplayerload_avatarborder_grandmaster.dds as a Normal type with tiled set to False tint color (100%, 100%, 100%) and blend mode Normal
Variable - Set Help Dialog Buttons - Dialog Items[index][3] = (Last created dialog item)
Dialog - Create a label for dialog (Last created dialog) with the dimensions (160, 70) anchored to Top Left with an offset of ((X Pos - 170), (Y Pos + 22)) with the text Temp Text[index] color set to Automatic text writeout set to False with a writeout duration of 2.0
Variable - Set Help Dialog Buttons - Dialog Items[index][4] = (Last created dialog item)
Dialog - Create a button for dialog (Last created dialog) with the dimensions ((X Size - 14), (Y Size - 14)) anchored to Top Left with an offset of ((X Pos + 7), (Y Pos + 7)) setting the tooltip to Temp Text 2[index] with button text "" and the hover image set to Dialog - Highlighted
Dialog - Fade (Last created dialog item) to a transparency of 80.0% over a period of 0.0 seconds for (All players)
Variable - Set Help Dialog Buttons - Dialog Items[index][5] = (Last created dialog item)
Just a copy and paste of one of my dialogs, which puts buttons on the right of the screen to tell players when they have too much gold, skill points, stat points. This gives it a cool border, an icon, a button to be clicked (for triggering events) and text. If you only want a picture and text, you only need 2 parts from it. (Picture attached, the plus sign bottom right)
To update it, you either need to run a loop endlessly (use a repeat - forever, with a wait) or trigger specifically when the data is updated. If it is just a simple display, not like HP or something that needs to be specific to the .1 second, using a 1 second loop isnt bad. Having a lot of little repeat loops isnt good though; if you have multiple repeat loops like that, you should combine them all into 1 trigger and put them on their own thread.
As I just mentioned in someone else's post, you want the ui editor if you are working with abilities. Diplaying cooldowns on an icon is a bit of an annoyance. The ui editor can give you everything you want with far less effort put in. I'd suggest talking with the people above about the ui editor. I know there are many tutorials for moving abilities around. I've done it myself, with the tutorials on this site. Took me about 5-6 hours to figure out how stuff worked. I'm sure the pros can do it in 15 min.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
I don't know what spear of adun is, but using a dialog is always better than using a screen button.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
Quote from BigDonRob:
So wait. Should I simply hide the dialogue and just SHOW it each time?
----
yes, absolutely.
Dialog - Create a Modal dialog of size (335, 320) at (50, 200) relative to Bottom Right of screen
Dialog - Show (Last created dialog) for (All players)
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-zergling.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\ui_hots_border_shared_01.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 0) with the text {"Level "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 50) with the text {"Amount Per Wave "(Text((Value 1 * Value 2)))} color set to Automatic text writeout set to False with a writeout duration of 2.0
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 100) with the text {"Enemy Zerglings Killed "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
Take that, and put it in a map initialization trigger, so it is made when the map loads. Then, anything on it you wish to change (the text) set to a global variable of type "dialog item" So it should look like this:
Dialog - Create a Modal dialog of size (335, 320) at (50, 200) relative to Bottom Right of screen
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG" = LAST CREATED DIALOG***************
Dialog - Show (Last created dialog) for (All players)
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\btn-unit-zerg-zergling.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create an image for dialog (Last created dialog) with the dimensions (120, 90) anchored to Top Left with an offset of (5, 5) setting the tooltip to "" using the image Assets\Textures\ui_hots_border_shared_01.dds as a Normal type with tiled set to False tint color White and blend mode Normal
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 0) with the text {"Level "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG ITEM[ARRAY 1]" = LAST CREATED DIALOG ITEM***************
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 50) with the text {"Amount Per Wave "(Text((Value 1 * Value 2)))} color set to Automatic text writeout set to False with a writeout duration of 2.0
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG ITEM[ARRAY 2]" = LAST CREATED DIALOG ITEM***************
Dialog - Create a label for dialog (Last created dialog) with the dimensions (200, 50) anchored to Top Left with an offset of (150, 100) with the text {"Enemy Zerglings Killed "(Text(Integer))} color set to Automatic text writeout set to False with a writeout duration of 2.0
***********SET VARIABLE: "GLOBAL VARIABLE OF TYPE DIALOG ITEM[ARRAY 3]" = LAST CREATED DIALOG ITEM***************
Then, you can show and hide the dialog by referencing the variable; and you can change the text by referencing the variables of the dialog items.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
"destroys the dialog"
You dont want to be destroying and creating dialogs every time you need to update them; this is going to suck a lot of power outta your game. you can simple set the dialog item "text" to a variable. Then you can use the trigger "Set dialog item text" and reference that variable, to alter the text of the dialog item.
With something as simple as updating a single line of text on a dialog, you can run it every .1 second for the entire game, and it shouldnt cause any lag (though i absolutely wouldnt recommend it).
It would be insanely helpful if you told me what it was updating. Since you say that it is displaying a number you have saved into a variable, every time you update that variable, you can update the dialog text. This is the absolute best way to do it; and very easy to implement. Every time you modify the variable, just add, "Set dialog item text (Dialog item variable) = convert integer (variable) to text"
***Edit*** I forgot to mention, UI and dialogs are different. There is an actual UI editor, which the people above are trying to help you with. That alters the game UI. It is much more difficult (in my opinion) than creating dialogs. Though there is some stuff UI can do that isn't as viable through dialogs.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
I dont do any UI editing; but I do a lot of dialog work to make my own UI like stuff. Considering you are setting values for this box with triggers anyway, why not just make a dialog box and use the triggers to update said dialog box?
More specifically, say what you want in the long run, so we can show you other ways of getting there. If what you want is an icon on the screen with a number on it reflecting a variable, yes, use a dialog box. This is 5 minutes worth of work.
Dialog - Create a Modal dialog of size (335, 320) at (-20, 140) relative to Right of screen
Variable - Set Help Dialog Buttons - Dialog Box = (Last created dialog)
Dialog - Show (Last created dialog) for (All players)
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions ((X Size - 10), (Y Size - 10)) anchored to Top Left with an offset of ((X Pos + 5), (Y Pos + 5)) setting the tooltip to "" using the image Temp Image[index] as a Normal type with tiled set to False tint color (100%, 100%, 100%) and blend mode Normal
Variable - Set Help Dialog Buttons - Dialog Items[index][2] = (Last created dialog item)
Dialog - Create an image for dialog (Last created dialog) with the dimensions ((X Size - 0), (Y Size - 0)) anchored to Top Left with an offset of ((X Pos + 0), (Y Pos + 0)) setting the tooltip to "" using the image Assets\Textures\ui_multiplayerload_avatarborder_grandmaster.dds as a Normal type with tiled set to False tint color (100%, 100%, 100%) and blend mode Normal
Variable - Set Help Dialog Buttons - Dialog Items[index][3] = (Last created dialog item)
Dialog - Create a label for dialog (Last created dialog) with the dimensions (160, 70) anchored to Top Left with an offset of ((X Pos - 170), (Y Pos + 22)) with the text Temp Text[index] color set to Automatic text writeout set to False with a writeout duration of 2.0
Variable - Set Help Dialog Buttons - Dialog Items[index][4] = (Last created dialog item)
Dialog - Create a button for dialog (Last created dialog) with the dimensions ((X Size - 14), (Y Size - 14)) anchored to Top Left with an offset of ((X Pos + 7), (Y Pos + 7)) setting the tooltip to Temp Text 2[index] with button text "" and the hover image set to Dialog - Highlighted
Dialog - Fade (Last created dialog item) to a transparency of 80.0% over a period of 0.0 seconds for (All players)
Variable - Set Help Dialog Buttons - Dialog Items[index][5] = (Last created dialog item)
Just a copy and paste of one of my dialogs, which puts buttons on the right of the screen to tell players when they have too much gold, skill points, stat points. This gives it a cool border, an icon, a button to be clicked (for triggering events) and text. If you only want a picture and text, you only need 2 parts from it. (Picture attached, the plus sign bottom right)
To update it, you either need to run a loop endlessly (use a repeat - forever, with a wait) or trigger specifically when the data is updated. If it is just a simple display, not like HP or something that needs to be specific to the .1 second, using a 1 second loop isnt bad. Having a lot of little repeat loops isnt good though; if you have multiple repeat loops like that, you should combine them all into 1 trigger and put them on their own thread.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418