HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dialog Buttons

08-15-2006, 12:05 PM#1
n13astra
Ok need some more help.

Trying to make a menu that pops up for each player that allows them to select what to upgrade on there tank. The menu comes up only when they come within range of a unit, as can be seen.

How can i make it so more than 1 player can do the upgrade at once.

This is the current code but it doesnt work.

Trigger:
Start an Upgrade
Collapse Events
Unit - A unit comes within 10.00 of Circle of Power (large) 0188 <gen>
Unit - A unit comes within 10.00 of Circle of Power (large) 0197 <gen>
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
Collapse Or - Any (Conditions) are true
Collapse Conditions
((Distance between (Position of (Triggering unit)) and (Position of Circle of Power (large) 0188 <gen>)) Less than or equal to 60.00) and (Team_Of_Player[(Player number of (Owner of (Triggering unit)))] Equal to 1)
((Distance between (Position of (Triggering unit)) and (Position of Circle of Power (large) 0197 <gen>)) Less than or equal to 60.00) and (Team_Of_Player[(Player number of (Owner of (Triggering unit)))] Equal to 2)
Collapse Actions
Custom script: local unit udg_Temp_Unit
Game - Display to (All players) the text: DETECTED
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Team_Of_Player[(Player number of (Owner of (Triggering unit)))] Equal to 1
Collapse Then - Actions
Set Temp_Unit = Circle of Power (large) 0188 <gen>
Collapse Else - Actions
Set Temp_Unit = Circle of Power (large) 0197 <gen>
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in (Units within 256.00 of (Position of Temp_Unit) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) is in Players_Start) Equal to True)))) Less than or equal to 1
Collapse Then - Actions
Unit - Pause (Triggering unit)
Dialog - Clear Upgrade_Dialog[(Player number of (Owner of (Triggering unit)))]
Dialog - Change the title of Upgrade_Dialog[(Player number of (Owner of (Triggering unit)))] to What would you like...
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Strength of (Triggering unit) (Exclude bonuses)) Less than or equal to 50
Collapse Then - Actions
Dialog - Create a dialog button for Upgrade_Dialog[(Player number of (Owner of (Triggering unit)))] labelled |cff00ff00Hit Point...
Set Upgrade_Button[0] = (Last created dialog Button)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Agility of (Triggering unit) (Exclude bonuses)) Less than or equal to 50
Collapse Then - Actions
Dialog - Create a dialog button for Upgrade_Dialog[(Player number of (Owner of (Triggering unit)))] labelled |cffff0000Armor/Spe...
Set Upgrade_Button[1] = (Last created dialog Button)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Intelligence of (Triggering unit) (Exclude bonuses)) Less than or equal to 50
Collapse Then - Actions
Dialog - Create a dialog button for Upgrade_Dialog[(Player number of (Owner of (Triggering unit)))] labelled |cff312000Mana|r
Set Upgrade_Button[2] = (Last created dialog Button)
Else - Actions
Dialog - Show Upgrade_Dialog[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
Trigger - Turn on Upgrade Check <gen>
Wait 10.00 game-time seconds
Unit - Unpause (Triggering unit)
Dialog - Hide Upgrade_Dialog[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
Trigger - Turn off Upgrade Check <gen>
Collapse Else - Actions
Game - Display to (All players) the text: (TOO MANY UNITS AROUND + (String((Number of units in (Units within 256.00 of (Position of Temp_Unit) matching ((((Triggering unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) is in Players_Start) Equal to True)))))))
Set Temp_Unit = No unit

Trigger:
Upgrade Check
Collapse Events
Dialog - A dialog button is clicked for Upgrade_Dialog[1]
Dialog - A dialog button is clicked for Upgrade_Dialog[2]
Dialog - A dialog button is clicked for Upgrade_Dialog[3]
Dialog - A dialog button is clicked for Upgrade_Dialog[4]
Dialog - A dialog button is clicked for Upgrade_Dialog[5]
Dialog - A dialog button is clicked for Upgrade_Dialog[6]
Dialog - A dialog button is clicked for Upgrade_Dialog[7]
Dialog - A dialog button is clicked for Upgrade_Dialog[8]
Dialog - A dialog button is clicked for Upgrade_Dialog[9]
Dialog - A dialog button is clicked for Upgrade_Dialog[10]
Conditions
Collapse Actions
Custom script: local unit udg_Temp_Unit
Trigger - Turn off (This trigger)
Set Temp_Unit = Tank[(Player number of (Triggering player))]
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Upgrade_Button[0]
Collapse Then - Actions
Game - Display to (Player group((Triggering player))) the text: HP
Hero - Set Strength ofTemp_Unit to ((Strength of Temp_Unit (Exclude bonuses)) + 10), (Permanent or Temporary:Permanent)
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Upgrade_Button[1]
Collapse Then - Actions
Game - Display to (Player group((Triggering player))) the text: ARMOR
Hero - Set Agility ofTemp_Unit to ((Agility of Temp_Unit (Exclude bonuses)) + 10), (Permanent or Temporary:Permanent)
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Upgrade_Button[2]
Collapse Then - Actions
Game - Display to (Player group((Triggering player))) the text: MANA
Hero - Set Intelligence ofTemp_Unit to ((Intelligence of Temp_Unit (Exclude bonuses)) + 10), (Permanent or Temporary:Permanent)
Collapse Else - Actions
Game - Display to (Player group((Triggering player))) the text: BIG PROBLEM
Skip remaining actions
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (100.00, 0.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (0.00, 100.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (-100.00, 0.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (0.00, -100.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Wait 1.20 game-time seconds
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (80.00, -80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (80.00, 80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (-80.00, 80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (-80.00, -80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Wait 1.20 game-time seconds
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (100.00, 0.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (0.00, 100.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (-100.00, 0.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (0.00, -100.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Animation - Change (Triggering unit)'s size to ((100.00 + (Real((Strength of Temp_Unit (Exclude bonuses)))))%, (100.00 + (Real((Strength of Temp_Unit (Exclude bonuses)))))%, (100.00 + (Real((Strength of Temp_Unit (Exclude bonuses)))))%) of its original size
Wait 1.20 game-time seconds
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (80.00, -80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (80.00, 80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (-80.00, 80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (-80.00, -80.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Wait 1.20 game-time seconds
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (100.00, 0.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (0.00, 100.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (-100.00, 0.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at ((Position of Temp_Unit) offset by (0.00, -100.00)) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Special Effect - Destroy (Last created special effect)
Wait 1.20 game-time seconds
Unit - Unpause Temp_Unit
Set Temp_Unit = No unit
08-16-2006, 12:05 AM#2
n13astra
help anyone?
08-16-2006, 12:20 AM#3
st33m
What specificaly doesnt work.

And why post again in the same minute?
08-16-2006, 12:33 AM#4
n13astra
I was bumping up my post thats all.

I want to be able to make this so any player can have the menu up at the same time. Currently its not doing that. Only 1 player can do it a one time. How can i fix this?
08-16-2006, 10:08 AM#5
The)TideHunter(
PlayerGroup - Pick every player in All players and show Dialog.

GUI action like that.
08-16-2006, 12:54 PM#6
Blade.dk
@ n13astra: read the rules and follow them.

@ st33m, Thunder_Eye and The)TideHunter(: Thanks for wasting our time, your posts are again the rules as well. Let the moderators take care of moderating tasks.