I have to say thanks for this tutorial. It really helped me understand everything. I went through it with no problem besides that the images weren't aligned with the buttons but I was able to fix that myself. Now I've implemented this into a brand new dialog with 30 buttons 10 for each race and to display different buttons for each team depending on race.
This may be a necro but i need some help with this, it may be an update in the editor or i messed something up but here goes. I've checked over this whole tutorial and his sample map for hours and cannot figure out why my dialog box gets cut in half or in a third when testing this. I've tried editing almost everything and even running his sample map and still have the same problem. My code is 100% replica of his in the sample map so this is why i am confused.
I did change the button layout to 6 across instead of 2 rows, but even with the default value its still cut in the same place.
I'm in the exact same boat! Been 3 hours over here. I changed some things as I went... so I figured I screwed something up. But then I downloaded the test map and it's broken too. Now I'm sad...
I'm hoping to salvage some of the work, but I have no idea what to do. My top 3 buttons show up fine, but my fourth button (which should be underneath button 1, specifically as the first button on row 2). Instead, the fourth button shows up in column 4 but in row 2...
UPDATE:
Sometimes I really hate blizzard... this is so strange.
So the problem in my map is that the x variable does not revert back to 40 (cDialog Border) after each iteration of the first For each integer Loop. Here's the part that is mind blowing:
Debug - Display (Text(x)) as debug output using Type 01, and Do display it in the game window
Variable - Set x = 40.0
Debug - Display (Text(x)) as debug output using Type 01, and Do display it in the game window
This actually displays "0" "0". The "Set x = 40" does not set x equal to 40!
Oddly, the modify variable x statement does actually work.
UPDATE 2:
I got mine to work, though I'm scared of this trigger now. Instead of setting x = cDialog Border at the start of the first loop (which again somehow doesn't work), I used this statement at the end of the first loop so that it resets before the second loop:
Okay... now I feel shame. It turns out I had an old global variable called 'x' and got them confused. That solves my problem. I don't know why the original map doesn't work still though.
43 posts and made an excellent tutorial and he only has 4 reputation? Come an people..
Thanks a lot for the tutorial, I don't understand anything so far, but give me a week or two and my brain might accept all the information in here, don't blame me for being a slow learner, I'm old, and got adhd! ;P
Ready, set..... GO, time to learn, brb !!
BTW: Can you upload a map that doesn't look like this when you test it?
I have a question that variable "nUnit Buttons" is local variable in Unit Button Folder, How can you access it from variable nCols in Unit Selection Dialog folder ?
Thanks for the great tutorials! It's really helping me figure out the triggers and dialogs. Now I have an idea of what I'm looking at instead of seeing a jumbled mess. :)
Just as a note to anyone else following this tutorial in 2016. For the custom scripts near the beginning [(cDialog Border * 2) for example], in the current version of the editor the internal name has to be used instead. For me that's meant adding "gv_" in front of variables [for example, (gv_cDialog Border * 2)].
I feel as though this is pretty outdated, especially with custom calls. Honestly, to make a good looking dialog:
Create dialog
hide dialog background
create dialog item image (to use as background for dialog)
create dialog item image (image type border, search "frame" for good images)
There is your basic dialog
Buttons?
Create item image of size 250X100 (set tint pure black, of any image)
Create item image of size 250X100 (search "difficulty_glow" set to whatever color you want the button)
Create item Button of size 250X100 (no text, fill in tooltip)
fade last created item to 85%
Create item label (Button text here)
Create item image of size 250X100 (of type border, search "frame" for good images)
Get decent at it, and you can, without too much effort, make good dialogs.
I have to say thanks for this tutorial. It really helped me understand everything. I went through it with no problem besides that the images weren't aligned with the buttons but I was able to fix that myself. Now I've implemented this into a brand new dialog with 30 buttons 10 for each race and to display different buttons for each team depending on race.
Liked!
Thanks a lot!
-Projekton
This may be a necro but i need some help with this, it may be an update in the editor or i messed something up but here goes. I've checked over this whole tutorial and his sample map for hours and cannot figure out why my dialog box gets cut in half or in a third when testing this. I've tried editing almost everything and even running his sample map and still have the same problem. My code is 100% replica of his in the sample map so this is why i am confused.
I did change the button layout to 6 across instead of 2 rows, but even with the default value its still cut in the same place.
http://tinypic.com/view.php?pic=29os7pj&s=6
@kevdudex1: Go
I'm in the exact same boat! Been 3 hours over here. I changed some things as I went... so I figured I screwed something up. But then I downloaded the test map and it's broken too. Now I'm sad...
I'm hoping to salvage some of the work, but I have no idea what to do. My top 3 buttons show up fine, but my fourth button (which should be underneath button 1, specifically as the first button on row 2). Instead, the fourth button shows up in column 4 but in row 2...
UPDATE:
Sometimes I really hate blizzard... this is so strange.
So the problem in my map is that the x variable does not revert back to 40 (cDialog Border) after each iteration of the first For each integer Loop. Here's the part that is mind blowing:
Debug - Display (Text(x)) as debug output using Type 01, and Do display it in the game window Variable - Set x = 40.0 Debug - Display (Text(x)) as debug output using Type 01, and Do display it in the game window
This actually displays "0" "0". The "Set x = 40" does not set x equal to 40!
Oddly, the modify variable x statement does actually work.
UPDATE 2:
I got mine to work, though I'm scared of this trigger now. Instead of setting x = cDialog Border at the start of the first loop (which again somehow doesn't work), I used this statement at the end of the first loop so that it resets before the second loop:
Variable - Modify x: + ((x * -1) + cDialog Border)
UPDATE 3:
Okay... now I feel shame. It turns out I had an old global variable called 'x' and got them confused. That solves my problem. I don't know why the original map doesn't work still though.
43 posts and made an excellent tutorial and he only has 4 reputation? Come an people..
Thanks a lot for the tutorial, I don't understand anything so far, but give me a week or two and my brain might accept all the information in here, don't blame me for being a slow learner, I'm old, and got adhd! ;P
Ready, set..... GO, time to learn, brb !!
BTW: Can you upload a map that doesn't look like this when you test it?
The typo is here:
Dialog Height = (+ (cDialog Extra, (cButton Gap * nRows), (cButton Gap * (nRows - 1)))) <Integer>
It should be:
Dialog Height = (+ (cDialog Extra, (cButton Size * nRows), (cButton Gap * (nRows - 1)))) <Integer>
@jaminv: Go
I have a question that variable "nUnit Buttons" is local variable in Unit Button Folder, How can you access it from variable nCols in Unit Selection Dialog folder ?
Thanks for the great tutorials! It's really helping me figure out the triggers and dialogs. Now I have an idea of what I'm looking at instead of seeing a jumbled mess. :)
Just as a note to anyone else following this tutorial in 2016. For the custom scripts near the beginning [(cDialog Border * 2) for example], in the current version of the editor the internal name has to be used instead. For me that's meant adding "gv_" in front of variables [for example, (gv_cDialog Border * 2)].
I feel as though this is pretty outdated, especially with custom calls. Honestly, to make a good looking dialog:
Create dialog hide dialog background create dialog item image (to use as background for dialog) create dialog item image (image type border, search "frame" for good images)
There is your basic dialog Buttons?
Create item image of size 250X100 (set tint pure black, of any image) Create item image of size 250X100 (search "difficulty_glow" set to whatever color you want the button) Create item Button of size 250X100 (no text, fill in tooltip) fade last created item to 85% Create item label (Button text here) Create item image of size 250X100 (of type border, search "frame" for good images)
Get decent at it, and you can, without too much effort, make good dialogs.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418