# Hero Tavern Selection Help

Status
Not open for further replies.

#### R 3 D

Level 5
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.

#### MistAssass

Level 9
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 :

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

#### Yixx

Level 16
• 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

#### R 3 D

Level 5
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

#### Eleandor

Level 21
Step 1) Place your tavern on the map
Step 2) ...
Step 3) Profit!

Level 5

#### MistAssass

Level 9
do you mean that your summoned hero just leaves the tavern and WALKS in the right/left side ?

#### Yixx

Level 16
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!

#### R 3 D

Level 5
Like Dota!

What the hell is all this integer crap

#### wolfman

Level 11
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...

#### Yixx

Level 16
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)

#### wolfman

Level 11
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.

Replies
1
Views
540
Replies
2
Views
633
[Trigger] Hero Tavern
Replies
7
Views
1K
Replies
8
Views
685
Replies
2
Views
586