Dialog

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
Joshsta818
Member
Posts: 86
Joined: April 7th, 2007, 2:39 am

Dialog

Post by Joshsta818 »

im making a quick little 20 minute tower defence and i have all the basics down, just needa start on the races.

3 seconds into the game i want 4 dialog buttons labled - Human - Orc - Night Elf - Undead - to pop up, for some reason i cant get ALL 4 buttons to show up. and i do kno how to do the actions for when a button is clicked. thanks!
Image
WhiteSkidMaul Wars
~Now Gone Superspeed!~
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Dialog

Post by Xantan »

variables - dialog
variables - dialogbuttonx4 or array
actions -dialog - title
actions - dialog - create dialog button named x x4


actions - dialog - show dialog for player
User avatar
I_SLAYER_I
Newcomer
Posts: 14
Joined: August 2nd, 2007, 4:09 pm
Title: Im With Stupid ->

Re: Dialog

Post by I_SLAYER_I »

Ill make it easier for you lol

Heres you go:

Create a variable of type "Dialog". call it race
Create 4 variables of type "Dialog Button", call them human, orc, nightelf, undead.

Code: Select all

Events 
   Time - Elapsed game time is 1.00 seconds 

Conditions 

Actions 
   Dialog - Clear race
   Dialog - Change the title of race to "Select your Race" 
   Dialog - Create a dialog button for race labeled "Humans" 
   Set human = (Last created dialog Button) 
   Dialog - Create a dialog button for race labeled "Orc" 
   Set orc = (Last created dialog Button) 
   Dialog - Create a dialog button for race labeled "Night Elf" 
   Set Night Elf = (Last created dialog Button) 
   Dialog - Create a dialog button for race labeled "Undead" 
   Set Undead = (Last created dialog Button)
   Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
          Dialog - Show race for (Picked player)



To Create all Builders in same region
*Note you have to do this for every Button

Code: Select all

Events 
   Dialog - A dialog button is clicked for race

Conditions 
   (Clicked dialog button) Equal to Human

Actions
   Unit - Create 1 humanBuilder for (Triggering Player) at Centre of Region 
To Create builders In Different Regions
*Note - you have to do this for every Human Player
*Note - you have to do this for every Button

Code: Select all

Events 
   Dialog - A dialog button is clicked for race

Conditions 
   (Clicked dialog button) Equal to Human
   (Owner of (Triggering unit)) Equal to Player 1 (Red)

Actions
   Unit - Create 1 Humanbuilder for Player 1 (Red) at (Center of (Region)) facing Default building facing degrees
Optional Text
*Note - add this under: Unit - Create 1 Humanbuilder for Player 1 (Red) at (Center of (Region)) facing Default building facing degrees

*Note - Will only work with the above trigger

Code: Select all

Game - Display to (All players) the text: ((Name of (Triggering player)) + Has just selected the human race!)

Hope I Helped :lol:

I_SLAYER_I
Image
User avatar
Joshsta818
Member
Posts: 86
Joined: April 7th, 2007, 2:39 am

Re: Dialog

Post by Joshsta818 »

Thanks, btw like ure sig :p
Image
WhiteSkidMaul Wars
~Now Gone Superspeed!~
User avatar
I_SLAYER_I
Newcomer
Posts: 14
Joined: August 2nd, 2007, 4:09 pm
Title: Im With Stupid ->

Re: Dialog

Post by I_SLAYER_I »

Glad to be of help

dancing tauren ftw :lol:


I_SLAYER_I
Image
User avatar
colmo
V.I.P.
Posts: 329
Joined: June 13th, 2007, 4:42 pm
Title: Wc3 is for Nerds!!!!

Re: Dialog

Post by colmo »

Events
Time - Elapsed game time is 60.00 seconds

Conditions

Actions
Dialog - Clear race
Dialog - Change the title of race to "Select your Race"
Dialog - Create a dialog button for race labeled "Ancient Evil of Death"
Set Ancient Evil of Death = (Last created dialog Button)
Dialog - Create a dialog button for race labeled "Ancient Evil of Doom"
Set Ancient Evil of Doom = (Last created dialog Button)
Dialog - Create a dialog button for race labeled "Ancient Evil of Shadows"
Set Ancient Evil of Shadows = (Last created dialog Button)
Player Group - Pick Player 10 and do (Actions)
Loop - Actions
Dialog - Show race for (Player 10)
____________________________________________________________________

Events
Dialog - A dialog button is clicked for race

Conditions
(Clicked dialog button) Equal to Ancient Evil of Death

Actions
Unit - Create 1 Ancient Evil of Death for (Player 10) at Centre of Region
__________________________________________________________________________________________

Events
Dialog - A dialog button is clicked for race

Conditions
(Clicked dialog button) Equal to Ancient Evil of Doom

Actions
Unit - Create 1 Ancient Evil of Doom for (Player 10) at Centre of Region

______________________________________________________________________

Events
Dialog - A dialog button is clicked for race

Conditions
(Clicked dialog button) Equal to Ancient Evil of Shadows

Actions
Unit - Create 1 Ancient Evil of Shadows for (Player 10) at Centre of Region



Is all this right if i wanted Player 10 (Dark Green) too choose between these 3 Vampires 60 seconds after start of game?
...................................................................................................................
Image

[blinking]How Do You Like Me Now? Also Im Going To Capitolize Every Word That I Type From Now On Just To Be Annoying.[/blinking]
User avatar
I_SLAYER_I
Newcomer
Posts: 14
Joined: August 2nd, 2007, 4:09 pm
Title: Im With Stupid ->

Re: Dialog

Post by I_SLAYER_I »

You need to add:

Dialogue - hide race for player 10

at the end of uit, so that when the button is clicked it hides the dialogue.

other than that its fine


I_SLAYER_I
Image
User avatar
colmo
V.I.P.
Posts: 329
Joined: June 13th, 2007, 4:42 pm
Title: Wc3 is for Nerds!!!!

Re: Dialog

Post by colmo »

Ok ty ty

ok im trying to get player 10 to spawn a vampire because i had it where player 10 spawned creeps but now ive changed that
, i found this

Code: Select all

function Trig_Vampire_Dialog_Actions takes nothing returns nothing
	call DialogClear(udg_dialog02)
	call DialogSetMessage(udg_dialog02,"Choose Your Vampire")
	call DialogAddButtonBJ(udg_dialog02,"|cffff0000Doom (Strength)|r")
	set udg_buttons02[1]=bj_lastCreatedButton
	call DialogAddButtonBJ(udg_dialog02,"|cff00ff00Death (Agility)|r")
	set udg_buttons02[2]=bj_lastCreatedButton
	call DialogAddButtonBJ(udg_dialog02,"|cff0000ffShadows (Intellegence)|r")
	set udg_buttons02[3]=bj_lastCreatedButton
	call DialogDisplayBJ(true,udg_dialog02,Player(11))
function Trig_Vamp_Type_Decision_Func001C takes nothing returns boolean
	return(GetClickedButton()==udg_buttons02[1])
endfunctionfunction Trig_Vamp_Type_Decision_Func001C takes nothing returns boolean
	return(GetClickedButton()==udg_buttons02[1])
endfunction

function Trig_Vamp_Type_Decision_Func002C takes nothing returns boolean
	return(GetClickedButton()==udg_buttons02[2])
endfunction
Could i just copy and paste that change all player (11) to Player (10) and get it too work? NM i tried it it gave me 160 compile errors so ill try something else
...................................................................................................................
Image

[blinking]How Do You Like Me Now? Also Im Going To Capitolize Every Word That I Type From Now On Just To Be Annoying.[/blinking]
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Dialog

Post by Xantan »

...If you want to copy+paste code

Trig_Vampire_Dialog_Actions [Vampire Dialog = trigger name to put it in]
(udg_dialog02)
udg_buttons02 (array)

you must define these things in the globals like he did! or go into the variable editor.
User avatar
colmo
V.I.P.
Posts: 329
Joined: June 13th, 2007, 4:42 pm
Title: Wc3 is for Nerds!!!!

Re: Dialog

Post by colmo »

Oh ok xantan ty
...................................................................................................................
Image

[blinking]How Do You Like Me Now? Also Im Going To Capitolize Every Word That I Type From Now On Just To Be Annoying.[/blinking]