Staredit Network > Forums > SC2 Assistance > Topic: Creating a dialog
Creating a dialog
Aug 19 2010, 9:26 pm
By: payne  

Aug 19 2010, 9:26 pm payne Post #1

:payne:

My actions:
Code
       Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Center of screen
       Variable - Set Game_Mode_Dialog = (Last created dialog)
       Dialog - Show Game_Mode_Dialog for (Host)
       Dialog - Set title of Game_Mode_Dialog to " - Shadow Hunters -</n> Select a Game Mode"
       Dialog - Create a button for dialog Game_Mode_Dialog with the dimensions (200, 50) anchored to Top Left with an offset of (150, 110) setting the tooltip to "BLAH BLAH" with button text "Game Mode #1" and the hover image set to ""
       Variable - Set GM_1 = (Last created dialog item)
       Dialog - Create a button for dialog Game_Mode_Dialog with the dimensions (200, 50) anchored to Top Left with an offset of (150, 160) setting the tooltip to "BLAH" with button text "Game Mode #2" and the hover image set to ""
       Variable - Set GM_2 = (Last created dialog item)


First of all... where do I set what the cadres of the Dialog should be? I dislike the current ones: they look very bad. Moreover, every time I test my map, they are randomized, probably switching between some kind of P/T/Z themes. ;o
Secondly, how do I recall my buttons? I can't seem to do a "Player 1 presses this button -> Do this" trigger. :(
As you might have seen, I'm showing this Dialog only to the Host. I'd like the others to see an other Dialog where they wouldn't think they have choice over the Game Mode that they will get to play. This other Dialog would only contain the names of the Game Modes and tolltips that shows their description. Any ideas on how to do that? :S


By the way, a tutorial/wiki on how to customize the most important fields of Dialogs and how to make players interact with them via triggers would be very useful.



None.

Aug 19 2010, 9:36 pm Alzarath Post #2

Praetor

To place a button and change the skin of it, here's an example:


To make the button intereactable, you must make a variable for it, as so:


Then you need to set the variable to the button:

Each individual button needs a separate ID number.

Then you have to make the click trigger:


I'll update it when all the images are uploaded.

Post has been edited 1 time(s), last time on Aug 19 2010, 9:43 pm by Artanis186.



None.

Aug 19 2010, 9:47 pm payne Post #3

:payne:

Look at my code... I have already set the buttons in variables. The problem is that I cannot select those variable... they somehow do not show up when I try to define the Doom Button of "(Used dialog item) == Doom Button".
Nvm, it looks like creating a "Dialog Button" isn't the right thing to do this.

SOLVED!

Use "Display Screen Button" instead. :)
Thanks a lot! :awesome:

EDIT: Nevermind. I -require- tooltips and the Screen Button action doesn't like its having one. :O
EDIT: Lol, it's okay. Keep the "Display Screen Button" and create a new action -> "Set Dialog Item Tooltip". :><:

Post has been edited 1 time(s), last time on Aug 19 2010, 9:52 pm by payne.



None.

Aug 19 2010, 9:49 pm Alzarath Post #4

Praetor

Oooh, I see what you're trying to do. I thought you were just trying to make a button that's used in-game. I'll post the image of the correct way when I get it extracted/uploaded. ^.^



None.

Aug 19 2010, 10:04 pm Alzarath Post #5

Praetor

Screw it, internet's too slow for me to load the Edit page, so I'm just gonna have to settle with a double post...

Here's the triggers I used:


And here are the variables:




None.

Aug 19 2010, 10:06 pm payne Post #6

:payne:

Well, everything is set up properly.
Is the "Run trigger" option buggy? I used it, and it somehow triggers 4 triggers... weird! Maybe because I have no Event or Condition set for them? Though I thought I didn't need any because I trigger the trigger from somewhere else. :O

EDIT: My current actions:

Code
       Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Center of screen
       Variable - Set Game_Mode_Dialog = (Last created dialog)
       Dialog - Show Game_Mode_Dialog for Host
       Dialog - Set title of Game_Mode_Dialog to " - Shadow Hunters - Select a Game M..."
       Dialog - Display button 1 of size (200, 50) with text "Game Mode #1" at Center of screen with offset (0, -70)  (run Game Mode 1 when button is clicked)
       Variable - Set GM_1 = (Last created dialog item)
       Dialog - Set (Last created dialog item) tooltip to "BLAH TEST BLAH TEST BLAH TEST BLAH ..." for (All players)
       Dialog - Display button 2 of size (200, 50) with text "Game Mode #2" at Center of screen with offset (0, -20)  (run Game Mode 2 when button is clicked)
       Variable - Set GM_2 = (Last created dialog item)
       Dialog - Set (Last created dialog item) tooltip to "BLAH TEST #1" for (All players)
       Dialog - Display button 3 of size (200, 50) with text "Game Mode #3" at Center of screen with offset (0, 30)  (run Game Mode 3 when button is clicked)
       Variable - Set GM_3 = (Last created dialog item)
       Dialog - Set (Last created dialog item) tooltip to "BLAH TEST #1" for (All players)
       Dialog - Display button 4 of size (200, 50) with text "Game Mode #4" at Center of screen with offset (0, 80)  (run Game Mode 4 when button is clicked)
       Variable - Set GM_4 = (Last created dialog item)
       Dialog - Set (Last created dialog item) tooltip to "BLAH TEST #2" for (All players)
       Dialog - Display button 5 of size (200, 50) with text "Game Mode #5" at Center of screen with offset (0, 130)  (run Game Mode 5 when button is clicked)
       Variable - Set GM_5 = (Last created dialog item)
       Dialog - Set (Last created dialog item) tooltip to "BLAH TEST #2" for (All players)


EDIT: Well, it looks like if you uncheck the "Trigger initially on" of the "Game Mode #" triggers (that one that are asked to be triggered when their respective button are clicked), it works. No need of any Event/Cond! :awesome:

EDIT: I reiterate an other question: anyone has an idea on how to make other players than the host understand they do not have the choice over the choice of the Game Mode? Though I want them to see the name of the Game Modes and their tooltip (description).

Post has been edited 3 time(s), last time on Aug 19 2010, 10:31 pm by payne.



None.

Aug 19 2010, 10:38 pm Alzarath Post #7

Praetor

What I did was make separate triggers. I made it so if Player 1 selects an option, it runs the trigger according to the button. While if another player clicks a button, it says 'Player X has suggested option X'



None.

Aug 19 2010, 10:42 pm Sand Wraith Post #8

she/her

You could put that information in the Help tab, right? I'm not sure how to set it up, but it'll probably be something along the lines of setting up Quests in WC3.

If you want, I could investigate it for you (but I feel kinda lazy :P ).

EDIT:

Okay I got bored and did some rudimentary investigating.

Code
hurr
   Events
       Game - Map initialization
   Local Variables
   Conditions
   Actions
       UI - Create a tip with title (Format tip "TITLEASSTITS" as Normal Tip), description "FUCKING DESCRIPTION HERE", alert text "ALERT THE FUCK OUTTA YOU" and icon Assets\Textures\btn-unit-zerg-mutalisk.dds for (All players)


okay so I'll explain a little bit so you don't have to test it out for yourself (even though it's a good idea to anyway)

"tip with title" - title - It's the header of the tip in the Help menu.
"description" - description - It's the actual tip text underneath the header in the Help menu.
"alert text" - in-game sidebar thingy - When you receive the tip, it will appear with the alert text beside the icon of the tip above the command card (around the bottom right of the in-game view).
"icon" - icon - The graphic thingy that's cool.

so if I had to draw a Venn diagram with ASCII

Code
HELP MENU___________________-------BOTH___________------IN-GAME____________________
  -title                            -icon                -alert text
  -description


EDIT2:

okay just putting this out there, this is easier than setting up WC3 quests by a shitton

Post has been edited 2 time(s), last time on Aug 19 2010, 10:55 pm by Sand Wraith.




Aug 19 2010, 10:53 pm payne Post #9

:payne:

Quote from Sand Wraith
You could put that information in the Help tab, right? I'm not sure how to set it up, but it'll probably be something along the lines of setting up Quests in WC3.

If you want, I could investigate it for you (but I feel kinda lazy :P ).
This is going to be my temporary solution.
Please investigate. <3

EDIT: Thanks for your EDIT. <3 x2.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
Please log in to shout.


Members Online: jun3hong, Ultraviolet, Roy