• 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.

Hero selection with double click?

Status
Not open for further replies.
Level 2
Joined
Apr 4, 2008
Messages
6
ok, so i've come across a game that had a unique way of selecting hero, using double click, im wondering if any one can help me with this sort of hero selection, im trying to impliment it into my map, the heroes are standing around a campfire sorta like on diablo 2 selection screen, and i need help with the triggers

This thread has helped 1 person!
If this thread helped you, [self="http://www.hiveworkshop.com/forums/newreply.php?do=newreply&noquote=1&p=685634"]post a comment[/self].
 
Last edited by a moderator:
Level 4
Joined
Jun 1, 2007
Messages
92
Check the ExtremeCandywars map, because it has the same exact way of picking heroes. This trigger is a rough way of doing it (it could be alot better but i dont have the time to make it perfectly), when double clicking any hero owned by red, it will create it.
  • Untitled Trigger 001
    • Events
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HasSelected[(Player number of (Triggering player))] Equal to 1
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to selected_hero[(Player number of (Triggering player))]
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: ((Name of (Triggering unit)) + has been chosen.)
              • Set HasSelected[(Player number of (Triggering player))] = 2
              • Unit - Create 1 (Unit-type of selected_hero[(Player number of (Triggering player))]) for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
              • Set selected_hero[(Player number of (Triggering player))] = (Triggering unit)
            • Else - Actions
              • Set HasSelected[(Player number of (Triggering player))] = 0
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
          • HasSelected[(Player number of (Triggering player))] Equal to 0
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: ((Name of (Triggering unit)) + has been selected. Click again to choose.)
          • Set selected_hero[(Player number of (Triggering player))] = (Triggering unit)
          • Set HasSelected[(Player number of (Triggering player))] = 1
        • Else - Actions
 
Status
Not open for further replies.
Top