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

Need help with selecting heroes for AoS map

Status
Not open for further replies.
Level 2
Joined
Apr 3, 2006
Messages
10
I have an area with 2 taverns full of heros, between them I have Hero spirits (wisps) to allow players to choose thier hero. This area is also Region 001. Now I want to make it so when lets say blue picks his hero the game will give blue the hero and move that hero to the correct team's keep. Likewise, let's say pink picks a hero, pink is on the other team. I want pink's hero to go to the other teams keep. How is this done? Also I have the camera panning complete for it, and I think I got the removal of the "Hero spirit" triggers correct, but I'm not sure. Could anyone tell me how to do this? Thanks in advance :)
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
That's pretty easy. There's many ways to do it so hum...

Let's take the Player Group ways. Create two variables, with Player Group variable type. Give the variables the names Team1 and Team2, or whatever you like.

Events:
Map Initializion

Actions:
Player Group: Add Player 1 (Red) to Team1
Player Group: Add Player 7 (Green) to Team2

Now, let's proceed to the buying hero trigger.

Events:
Generic Unit Event: A unit sells a unit

Conditions:
(choose if you want, I haven't made any in special)

Actions:
If/Then/Else (Multiple Functions):
If:
Boolean Comparison: ((Owner of (Buying Unit)) is in Team1) Equal to True
Then:
Unit: Move Unit (Instantly): Move (Sold Unit) instantly to Keep of team 1
Else:
Do Nothing

If/Then/Else (Multiple Functions):
If:
Boolean Comparison: ((Owner of (Buying Unit)) is in Team2) Equal to True
Then:
Unit: Move Unit (Instantly): Move (Sold Unit) instantly to Keep of team 2
Else:
Do Nothing


This should work. Post here if it doesn't. Good luck and have fun :wink:
 
Status
Not open for further replies.
Top