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.
This is how far I got when I decided to mess around with arrays again. So now I'm setting up an initialize trigger for the arrays, and then I have to reset all of my triggers with the new information.
But it works, I just have to fool around with the effects some more to get it just how I want it. I know that constants and variables should be set up before-hand, but I've just been testing different sizes and eyeballing the changes. Would I need to be worried about different.... uhh... resolutions? (widescreen, 4:3, whatever it is now) with just one image and some text?
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.
I understand (better) now. If I decide to implement a power system (like the spear of adun abilities), would it be easier to set up a dialog with as many buttons as I choose, or put in screen buttons and fit them to the dialog I make to frame it?
Just Player Abilities on a cooldown with an interface at the top of the screen. LotV has a number of abilities that can be upgraded and swapped out between missions.
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.
"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
@GlornII: Go
It doesn't destroy it each time it updates. It sets a break so that the button that initializes the dialog can't be pressed repeatedly.
This is how far I got when I decided to mess around with arrays again. So now I'm setting up an initialize trigger for the arrays, and then I have to reset all of my triggers with the new information.
But it works, I just have to fool around with the effects some more to get it just how I want it. I know that constants and variables should be set up before-hand, but I've just been testing different sizes and eyeballing the changes. Would I need to be worried about different.... uhh... resolutions? (widescreen, 4:3, whatever it is now) with just one image and some text?
So wait. Should I simply hide the dialogue and just SHOW it each time?
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
@GlornII: Go
I understand (better) now. If I decide to implement a power system (like the spear of adun abilities), would it be easier to set up a dialog with as many buttons as I choose, or put in screen buttons and fit them to the dialog I make to frame it?
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
@GlornII: Go
Just Player Abilities on a cooldown with an interface at the top of the screen. LotV has a number of abilities that can be upgraded and swapped out between missions.
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