• 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

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
  • Untitled Trigger 002
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to YourUnit
    • Actions
      • Set SelectedUnit = (Triggering Unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BOOLEANVARIABLE Equal to False
        • Then - Actions
          • Set BOOLEANVARIABLE = True
        • Else - Actions
          • Unit - Create 1 YourHero for Player 1 (Red) at (YourPoint) facing Default building facing degrees
Like this?

EDIT:

  • Untitled Trigger 003
    • Events
      • Player - Player 1 (Red) Deselects a unit
    • Conditions
      • (Triggering unit) Equal to SelectedUnit
    • Actions
      • Set SelectedUnit = nounit
      • Set BOOLEANVARIABLE = False
 
Level 11
Joined
Dec 5, 2009
Messages
846
You sure? You know that "YourUnit" And SelectedUnit are variables aswell as "BOOLEANVARIABLE"
Because it works for me here's the map.

EDIT: Don't forget to set the position in:
  • Unit - Create 1 Paladin for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
to a variable and clear it like this:
  • Custom script: call RemoveLocation(udg_YourVariable)
I was just lazy and didn't ^^
 

Attachments

  • HeroSelection.w3x
    16.8 KB · Views: 62
Level 2
Joined
Jan 26, 2012
Messages
5
Please help me in this HERO SELECTION SYSTEM i have a BUG
.
.
.
THIS BUG
HERE.jpg


from ↓

http://www.hiveworkshop.com/forums/triggers-scripts-269/hero-selection-214019/#post2124962
 
Status
Not open for further replies.
Top