• 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 Tavern Selection Help

Status
Not open for further replies.
Level 5
Joined
Dec 12, 2008
Messages
112
I want to make a tavern so when Player red picks a hero he goes to his side and when player blue picks a hero he goes to the other side

Thank you very much if you can solve this problem.
 
Level 9
Joined
Jan 23, 2008
Messages
384
ok you are not very exact ... do you mean when you are training a hero from a tavern to move the hero in your base or what ?

if you meant this you can make something simple like this :

  • your trigger
    • Events
      • Unit - a unit is selling a unit
    • Conditions
      • Unit type of selling unit is equal to <your tavern>
    • Actions
      • Unit - move sold unit instantly to Bubu<reg>
      • Player - pan camera over 2 seconds for triggering player over pozition of sold unit
      • ------------ Bubu<reg> its a region that u will make where the hero will be moved ------------
if you do not want this explain to me how do you want it ...
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Set SRegion[1] = Team1Region
  • Set SRegion[2] = Team2Region
  • Set SRegion[3] = Team3Region
  • And so on for every Team!
  • Set MaxPlayerAmount = Maximum players per team (Important! Make it real or integer, doesnt matter,)
  • Set TempReal = (Integer(Player number of (Owner of (Buying Unit))) / Integer(MaxPlayerAmount) + 0.99
  • Set SpawnPoint = Center of SRegion[Integer(TempReal)]
  • Unit - Move (Sold Unit) instantly to SpawnPoint
  • Custom script: call RemoveLocation(udg_SpawnPoint)
Check it, it works! =D
 
Level 5
Joined
Dec 12, 2008
Messages
112
Tavern

What I mean is

Player 1 and Player 2 are in different teams.

Player 1 chooses from the tavern 1 and goes to the left side.

Player 2 chooses also from the tavern 1 but goes to the right side
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Ok, if you set the MaxPlayersPerTeam to 1, it should work, take a look:
(not that everything will be rounded DOWN from Real>integer)
Player 1 = 1
1/1 = 1
1+0.99 = 1.99
1.99>integer = 1
Player 2 = 2
2/1 = 2
2+0.99 = 2.99
2.99>integer = 2
Player 3 = 3
3/1 = 3
3+0.99=3.99
3.99>integer=3
And so on,,
It works!
 
Level 11
Joined
May 31, 2008
Messages
698
ok do a unit enters region and condition its a hero. If then else --> if its on team 1 send to region Team_1. if its on team 2 send to region Team_2. Make the regions the hero enters right on the tavern. Tell me if you need the trigger but its not that hard to understand...
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Fine, if you want to have loads of if,then,elses, ok, but my thing works!
(well, actually i didnt make it, but i cant remember who i got it from :\ )
If you want only 1 person per team, you can do this:
  • Set SRegion[1] = Team1Region
  • Set SRegion[2] = Team2Region
  • Set SRegion[3] = Team3Region
  • For each Integer A from 1 to 12
    • Loop - Actions
      • If Owner of (Buying Unit) equal to Player(Integer A)
      • Then:
      • Set SpawnPoint = Center of Region[(Integer A)]
      • Unit - Move (Sold Unit) instantly to SpawnPoint
      • Custom script: call RemoveLocation(udg_SpawnPoint)
 
Level 11
Joined
May 31, 2008
Messages
698
Actually you would only need 1 if then else function if you had 2 teams...

if its on team 1
then send it to region team 1
else send it to region team 2
easy as that. Just make sure that you have the taverns blocked off if you do it this way.
 
Status
Not open for further replies.
Top