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

[Trigger] Hero Selection

Status
Not open for further replies.
Level 2
Joined
Feb 8, 2009
Messages
19
I've got a hero selection system, however everytime I pick a hero it allows me to pick another hero. How can I stop it from happening? I've made the Gameplay constants to only my custom heroes.
 
Level 6
Joined
Apr 24, 2008
Messages
174
You could make an simple boolean, named something like "Hero_Sected" and when somone picks a hero, you set "Hero_Sected" equal to True, then make an if - then - else action, if Hero_Sected Equal to True - Clear Selection for (Triggering Player), else (your action)
 
Level 4
Joined
Apr 25, 2008
Messages
75
I agree with MYHummeR, just make a Boolean variable and when they pick a hero check if the variable is True (already selected hero). If it is then cancel the hero selection and if its not then give them the hero and set the variable to True.
 
Level 3
Joined
Apr 23, 2009
Messages
58
Why don't you make it that the unit that select's the unit, and remove it from game

Like : Wips are the unit you choosen for selecting your unit, make that the triggering unit
with conditions, than make a loop that will remove the triggering unit, hope it clears up

(this goes for every heroes, so alot of these things for alot of heroes
 
Level 10
Joined
Aug 15, 2008
Messages
720
It leaks, you could select the hero what is selected and spawned in-game by another player and get it...

Now this works for me, If you need something more, just ask...

Get 2 rects/regions:
1. Is rect/region where heros what can be selected and played stands
2. Is the rect/region where selected hero will be moved from Hero selection area to rect/region where hero should spawn...

The Trigger's (Here is trigger with multiplayer example):
  • Select hero Red
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Hero Selection Location <gen> contains (Triggering unit)) Equal to (==) True
    • Actions
      • Unit - Move (Triggering unit) instantly to (Center of Hero Spawn Location <gen>)
      • Unit - Change ownership of (Triggering unit) to Player 1 (Red) and Change color
      • Trigger - Turn off (This trigger)
  • Select hero Blue
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • (Hero Selection Location <gen> contains (Triggering unit)) Equal to (==) True
    • Actions
      • Unit - Move (Triggering unit) instantly to (Center of Hero Spawn Location <gen>)
      • Unit - Change ownership of (Triggering unit) to Player 2 (Blue) and Change color
      • Trigger - Turn off (This trigger)
  • Select hero Teal
    • Events
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Hero Selection Location <gen> contains (Triggering unit)) Equal to (==) True
    • Actions
      • Unit - Move (Triggering unit) instantly to (Center of Hero Spawn Location <gen>)
      • Unit - Change ownership of (Triggering unit) to Player 3 (Teal) and Change color
      • Trigger - Turn off (This trigger)
And so on...
 
Status
Not open for further replies.
Top