wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > Tutorials for beginners
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-20-2006, 08:49 AM   #1
bounty_hunter2
User
 
bounty_hunter2's Avatar
 
Join Date: Feb 2006
Posts: 221

Submissions (5)

bounty_hunter2 is on a distinguished road (22)

Send a message via MSN to bounty_hunter2
Default Dialog Tutorial - Creating Dialogs

This tutorial will explain the creation of a Dialog box. If you don't know what is a dialog box take a look at the first attached image.

First you need two variables. The first variable - we will call it dialog_difficulty is type Dialog. The Second, which we will call dialog_difficulty_buttons is a Dialog button type. You will see that it has the array option. As you saw on my image I had 8 buttons so my array is 8. So the array is based on the amount of buttons you have. Here on this example I have two buttons so I have an array of 2.

Dialog Box - Creating it
Now we need to create our Dialog trigger. The trigger will go like this:

Trigger:
Dialog
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Dialog - Clear dialog_difficulty
Dialog - Change the title of dialog_difficulty to Difficulty
Dialog - Create a dialog button for dialog_difficulty labelled Easy
Set dialog_difficulty_buttons[1] = (Last created dialog Button)
Dialog - Create a dialog button for dialog_difficulty labelled Hard
Set dialog_difficulty_buttons[2] = (Last created dialog Button)
Dialog - Show dialog_difficulty for Player 1 (Red)

Now the next trigger will explain how to initiate an action when the button is clicked


Trigger:
Dialog 2
Collapse Events
Dialog - A dialog button is clicked for dialog_difficulty
Collapse Conditions
(Clicked dialog button) Equal to dialog_difficulty_buttons[1]
Collapse Actions
Game - Display to (All players) the text: Difficulty is easy.

Do the same for the next button. Please look at the images if you still don't understand.
Attached Images
File Type: jpg Dialog.JPG (112.3 KB, 543 views)
File Type: jpg Var.JPG (16.7 KB, 311 views)
File Type: jpg Dialog2.JPG (47.0 KB, 295 views)
File Type: jpg Dialog3.JPG (39.3 KB, 331 views)

Last edited by bounty_hunter2 : 06-01-2006 at 03:06 PM.
bounty_hunter2 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-20-2006, 09:31 AM   #2
Tim.
Missing You All at Wc3c
 
Tim.'s Avatar


Site Owner
 
Join Date: Jul 2003
Posts: 4,475

Submissions (18)

Tim. is a name known to all (503)Tim. is a name known to all (503)Tim. is a name known to all (503)Tim. is a name known to all (503)Tim. is a name known to all (503)

Approved Map: PiratesSpell making session 3 winner

Default

Please use [trigger] tags not [quote] tags.
__________________
"oO and if anyone called Tim. trys to make an account then kick there butts." -Mavus, moderator of the GTW forums


Avast! Seen Pirates? Get it here!
Tim. is offline   Reply With Quote
Old 05-20-2006, 10:49 AM   #3
bounty_hunter2
User
 
bounty_hunter2's Avatar
 
Join Date: Feb 2006
Posts: 221

Submissions (5)

bounty_hunter2 is on a distinguished road (22)

Send a message via MSN to bounty_hunter2
Default

didn't know they exsist....editing
so will it be excepted?

Last edited by bounty_hunter2 : 05-20-2006 at 10:50 AM.
bounty_hunter2 is offline   Reply With Quote
Old 05-25-2006, 07:38 AM   #4
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

I guess this could be approved as a tutorial for beginners, since we don't have a dialog tutorial yet.
However you should mention that for your code example a button array with the size 2 is required, not 8. Also I think more appropriate variable names like dialog_difficulty or something like that should be used for a tutorial.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 05-27-2006, 07:52 AM   #5
bounty_hunter2
User
 
bounty_hunter2's Avatar
 
Join Date: Feb 2006
Posts: 221

Submissions (5)

bounty_hunter2 is on a distinguished road (22)

Send a message via MSN to bounty_hunter2
Default

ok I'l update it.
bounty_hunter2 is offline   Reply With Quote
Old 05-28-2006, 02:38 PM   #6
Tim.
Missing You All at Wc3c
 
Tim.'s Avatar


Site Owner
 
Join Date: Jul 2003
Posts: 4,475

Submissions (18)

Tim. is a name known to all (503)Tim. is a name known to all (503)Tim. is a name known to all (503)Tim. is a name known to all (503)Tim. is a name known to all (503)

Approved Map: PiratesSpell making session 3 winner

Default

Quote:
Originally Posted by bounty_hunter2
ok I'l update it.
It has been a few days, are you actually going to update this or what?
__________________
"oO and if anyone called Tim. trys to make an account then kick there butts." -Mavus, moderator of the GTW forums


Avast! Seen Pirates? Get it here!
Tim. is offline   Reply With Quote
Old 06-01-2006, 03:02 PM   #7
bounty_hunter2
User
 
bounty_hunter2's Avatar
 
Join Date: Feb 2006
Posts: 221

Submissions (5)

bounty_hunter2 is on a distinguished road (22)

Send a message via MSN to bounty_hunter2
Default

realy sorry. I was ILL. Update today.

EDIT:
Topic updated.

Last edited by bounty_hunter2 : 06-01-2006 at 03:06 PM.
bounty_hunter2 is offline   Reply With Quote
Old 06-01-2006, 11:19 PM   #8
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Ok, looks good now. Moved to tutorials for beginners.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 06-02-2006, 06:40 AM   #9
bounty_hunter2
User
 
bounty_hunter2's Avatar
 
Join Date: Feb 2006
Posts: 221

Submissions (5)

bounty_hunter2 is on a distinguished road (22)

Send a message via MSN to bounty_hunter2
Default

great! Thanks
bounty_hunter2 is offline   Reply With Quote
Old 02-13-2009, 05:00 PM   #10
Alexis_Septimus
User
 
Alexis_Septimus's Avatar
 
Join Date: Jan 2009
Posts: 96

Alexis_Septimus has little to show at this moment (5)

Default

It is much better to set it this way, save much space.

Trigger:
Melee Initialization
Collapse Events
Dialog - A dialog button is clicked for dialog_difficulty
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to dialog_difficulty_button[1]
Collapse Then - Actions
Game - Display to (All players) the text: Difficult is easy.
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to dialog_difficulty_button[2]
Collapse Then - Actions
Game - Display to (All players) the text: Difficult is easy.
Else - Actions
Alexis_Septimus is offline   Reply With Quote
Old 05-04-2010, 01:15 PM   #11
canon shooter
User
 
Join Date: May 2010
Posts: 15

canon shooter has a little shameless behaviour in the past (-1)

Default

really?it seems to be hurting my head.
canon shooter is offline   Reply With Quote
Old 05-04-2010, 01:18 PM   #12
canon shooter
User
 
Join Date: May 2010
Posts: 15

canon shooter has a little shameless behaviour in the past (-1)

Default

also cool photos but the first one has an action called log entrys.how the hell are you supposed to write entrys?????
canon shooter is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 08:58 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services