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 creating a progress bar for dialog, put create a button for dialog instead under the Create Dialog Item action.
2. After the Set Dialog Item Size action, put in another action -> Move Dialog Item where this action will anchor the dialog item to your dialog.
3. Lastly, remove the Set Dialog Item Unit action because it may be unnecessary and conflicting.
4. Also, remove the action -> Set Dialog Fullscreen because putting this action will ignore the size of the dialog created action that you have created.
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?
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?
Hi, there,
You can try the following:-
1. Instead of creating a progress bar for dialog, put create a button for dialog instead under the Create Dialog Item action.
2. After the Set Dialog Item Size action, put in another action -> Move Dialog Item where this action will anchor the dialog item to your dialog.
3. Lastly, remove the Set Dialog Item Unit action because it may be unnecessary and conflicting.
4. Also, remove the action -> Set Dialog Fullscreen because putting this action will ignore the size of the dialog created action that you have created.
See if the above works out.
Thanks.
In reply to willjay84:
Yes, success yet, I've advanced, but it's still not functional, great help still! See what I get now is on the first screenshot now.
On the second screenshot is the update of my triggers.
My actual problem is that yes, the button is created, but I'd like the icon of the current progressing upgrade to show up in that button.
Can you help me out with that part?
In reply to Wonder_Rem:
Hi,
There are a few points that I want to point out:-
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.
Thanks.
I tried further more, it's not exactly what I'm looking for but I made a video to show you, if you think it's possible from there !
[https://www.youtube.com/watch?v=fxmgO7FrfHghttps://youtu.be/fxmgO7FrfHg]
I have unlinked the video on this comment, it doesn't seem to work when I try to watch it from here vs Youtube
Hi,
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?
Thanks and have a nice day.
Just had to remove the [ ] on the link ehe (although if you watch it in a month, it might be deleted).
Can anyone help me, I still haven't figured it out.. but it's all explained in the video