Hi, I'm looking to create a button that pops on the screen when an upgrade is on going from a particular unit. I've posted a screenshot of my first attempt, without success. I also tried playing with UI stuff, but im far from good at this stuff. Any help or exemple on how to create it?
1. Instead of setting the Upgrade Dialog & Upgrade Dialog Item variables as local variables, set them as global variables where you can link these variables in between triggers.
2. Remove the Hide Background image action so that the dialog frame will appear.
3. Instead of putting the action -> Create Dialog Item with type (Button), put the action Create Dialog Item (Button) for (Last Created Dialog) with dimensions (76,76) -> This is the dimension of a button. Right after that, set Upgrade Dialog Item variable as the button variable. Then, put Create Dialog Item (Image) for (Last Created Dialog) with dimensions (76,76) and put the button Image in .dds format as pictured. Then, create another dialog item global variable and set it as the image variable as pictured.
4. Remove the Set Dialog Item (Size) action.
5. Next, create another trigger with the Event -> Dialog Item is Used and specify the player -> eg. player 1. For player 2, create another trigger with the same event and specify player 2. The player integer here is a constant and a constant value will not change. Then, under Conditions, put Used Dialog Item == Upgrade Dialog Item (the button in Global Variable). From here on, you can then set the corresponding actions. Lastly, don't forget to put the action Destroy Dialog to move out of the Dialog Screen.
The attachment that I linked is just an example, for example, in the attachment, I put all players instead of specifying the player. You can alter this with convert player to player group (Owner of (Triggering Unit)) as you have shown, to specify the Owner of the said unit. The same could be said for the button image. You can alter the image of the button to your own liking.
You can also alter the dimension of the button, say, (100x100), but by doing so, you will need a bit of calculation to anchor the image in the center of the button.
What I'am trying to say is that I just lay out the basics or idea in creating dialog items such as buttons etc. and linking them with triggering events when used, and the rest, you can alter to your personal liking.
By the way, I cannot access the youtube video as mentioned. It says no result. Or you can send me a message in specifying what you want since I have no clue?