• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How can I cut dialog button when clicked

Status
Not open for further replies.
Level 4
Joined
Mar 12, 2008
Messages
89
I have at start dialog button, People from it choosing race and I need when somebody chosen Night elf to button night elf dissapear, can somebody help me ? :(
 
Make a boolean with an index for every race (I call it boolean_race[]).
Now, for the dialog, set the buttons like that
  • Actions
    • If boolean_race[0] = false then do: Dialog - Create a dialog button for *your dialog* titled *Race*
    • If boolean_race[1] = false then do: Dialog - Create a dialog button for *your dialog* titled *Race*
    • If boolean_race[2] = false then do: Dialog - Create a dialog button for *your dialog* titled *Race*
    • If boolean_race[3] = false then do: Dialog - Create a dialog button for *your dialog* titled *Race*
Now for the buttons, after peforming the actions after a button is clicked set the respective boolean to true
Like:
clicked dialog button == Button 1 -> set race_boolean[0] = true

Now if the boolean is set to true, the engine won't set up the dialogbutton ;)
 
squiggy I think I am idiot or I don´t know .. that doesn´t work :((
can u write me whole the script ? :(
 
Last edited:
The Code:

  • Events
  • Time - Elapsed game time is 5.00 seconds
  • Actions
  • Dialog - Clear DuchyCHoosedialog
  • Dialog - Change the title of DuchyCHoosedialog to Choose Duchy:
  • Dialog - Create a dialog button for DuchyCHoosedialog labelled England
  • Set DialogButton[1] = (Last created dialog Button)
  • Dialog - Create a dialog button for DuchyCHoosedialog labelled Normandy
  • Set DialogButton[2] = (Last created dialog Button)
  • Player Group - Pick every player in (All players) and do (Dialog - Show DuchyCHoosedialog for (Picked player))
variables = duchchoosedialog - dialog
dialigbutton - dialog button
now the trigger with england
  • Events
  • Dialog - A dialog button is clicked for DuchyCHoosedialog
  • Conditions
  • (Clicked dialog button) equal to DialogButton[1]
  • Actions
  • Game - Display to (All players) the text: England was picked
  • Unit - Create 1 Footman for (Triggering player) at (Center of zone 000 <gen>) facing Standart orientation of building degrees
 
  • Events
  • Time - Elapsed game time is 5.00 seconds
  • Actions
  • Dialog - Clear DuchyCHoosedialog
  • Dialog - Change the title of DuchyCHoosedialog to Choose Duchy:
  • If - EnglandPicked = False
  • Dialog - Create a dialog button for DuchyCHoosedialog labelled England
  • Set DialogButton[1] = (Last created dialog Button)
  • If - NormandyPicked = False
  • Dialog - Create a dialog button for DuchyCHoosedialog labelled Normandy
  • Set DialogButton[2] = (Last created dialog Button)
  • Player Group - Pick every player in (All players) and do (Dialog - Show DuchyCHoosedialog for (Picked player))
I just edited your trigger... you know where to find if...(EnglandPicked and NormandyPicked are booleans)

Then you need another trigger:

  • Events
  • Dialog - A dialog button is clicked for DuchyCHoosedialog
  • Conditions
  • (Clicked dialog button) equal to DialogButton[1]
  • Actions
  • Game - Display to (All players) the text: England was picked
  • Set - EnglandPicked = True
  • Run trigger (the upper one, where the buttons are created)
  • Unit - Create 1 Footman for (Triggering player) at (Center of zone 000 <gen>) facing Standart orientation of building degrees
I think that should work...
Do the last trigger for every race
 
hey ur idea sux, when play two players don´t sux when play one player I gave as attachment my map.. please rewrite buggs
 

Attachments

DarkAngelsAzalels idea was right, it just need a single fix:
Create initialization trigger, which creates a unit group.
  • Init Game
    • Events
      • Map Init
    • Actions
      • Set PlayerGroup = (All Players)
Then just remove players which choose race from the group
  • Button clicked
    • Events
      • Dialog Button Clicked
    • Actions
      • as above......
      • Player Group - Remove (Triggering player) from PlayerGroup
      • Trigger - run Init Dialog Trigger
And display the newly created dialog only to players that hasn't picked race already.
  • Init dialog
    • as above...
    • Player Group - Pick every player in PlayerGroup and do (Dialog - Show DuchyCHoosedialog for (Picked player))
 
it now does who clicked first make him dialog again but if click on buttons no untis created..it is bug but it not sux... when player 1 picks holy roman empire it will dissapear huge moravia empire ...but not holy ro man empire .. I am attaching map..check it if I wrote it right please

EDIT:
hm can you help me ? :cry::cry:
 

Attachments

Last edited by a moderator:
  • Angry
Reactions: Rui
Status
Not open for further replies.
Back
Top