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:
Upgrade Check

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

Actions


Custom script: local unit udg_Temp_Unit


Trigger - Turn off (This trigger)


Set Temp_Unit = Tank[(Player number of (Triggering player))]


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Clicked dialog button) Equal to Upgrade_Button[0]



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)



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Clicked dialog button) Equal to Upgrade_Button[1]





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)





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Clicked dialog button) Equal to Upgrade_Button[2]







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)







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