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

Hero selection

Status
Not open for further replies.
  • 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
 
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

Please help me in this HERO SELECTION SYSTEM i have a BUG
.
.
.
THIS BUG
HERE.jpg


from ↓

https://www.hiveworkshop.com/threads/hero-selection.214019/post-2124962
 
Status
Not open for further replies.
Back
Top