HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Limit hero training Question

09-09-2004, 07:27 PM#1
JoSanchez55
My map has a tavern hero selection, i have an initialize trigger that limits all players to having 1 hero. This works, but the problem is that for a repick trigger, when i remove every unit in the game owned by the player, the tavern will not again show the purchasable heros (even though the player has no hero).

So in basically i would like to know how i can make the tavern recognize the player has no hero anymore and thus enable purchasing of heros. I know dota does this (or has done it in earlier versions).

[edit]
I think the game just waits for any hero to enter then flags the player with "i have a hero". It doesnt search if a hero is presently owned by the player. (I think)

[EDIT AGAIN]
In case anyone else wants to know, this is what i did:

In initialization i set the limit for all players to -1 (infinite). Then when a hero is selected, i made a trigger that picks up when a unit enters the region around the taverns. In this trigger i made (among other things) it set the limit for the owner of triggering unit to 0 (none). Then when a player types -repick i set it to -1 again.

The only thing is, you have to make sure that the requirement levels all have no requirements!