HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

12 Heroes

07-16-2007, 09:35 PM#1
sas_Skorpion
Hello again :D i got this small problem ...

I want to make in my map when somebody buys the hero the hero disappears ...
Trigger:
Neutral Building - Add Hero to Hero Tavern 0012 <gen> with 0 in stock and a max stock of 1
Neutral Building - Remove (Unit-type of (Sold unit)) from all marketplaces

but when i use the command add hero to tavern ... it can only fit 11 ... i removed the "Select unit" icon but yet when i add the 12th hero it removes another one ... if i wasn't clear enough ask ill give more details ...
07-16-2007, 09:47 PM#2
vesuvan doppleganger
There is no way to add more slots to the tavern short of using spell book and dummy abilities. I recommend vexorians hero selection system.
07-16-2007, 09:56 PM#3
sas_Skorpion
Nah i don't get it ice frog made it work and said something about this function
Collapse JASS:
call SetPlayerTechMaxAllowed(PlayerId, UnitID, 0)
but i don't get it since i don't know jass :)=
07-16-2007, 10:04 PM#4
vesuvan doppleganger
Ah, I'm sorry, I misunderstood your question. I'll look through the dota code and tell you how it was done okay? just hold on a second.
07-16-2007, 10:06 PM#5
moyack
I don't know if this could work. Please test it.

1. Create a custom building based on a human farm
2. Change the model and shadow texture to the tavern
3. Add to "train unit" field all the heroes you need
4. okidoki.

Tell me if it works. About the function SetPlayerTechMaxAllowed(PlayerId, UnitID, 0) this one is used to limit the max amount of unit type UnitID that can be trained by the player PlayerID.
07-16-2007, 10:08 PM#6
sas_Skorpion
Sadly i already tried that weeks ago :D tried but again only 11 can stand .. the only way i know that works for the 12th hero is add them in the object editor - units sold but then u can't remove them ...

EDIT : my mistake .. i forgot to delete the rally point ...
but now i need to know 2 things :D how to remove the rally point icon and how to make it neutral but to allow players to train units :(

I Honestly think u can't train units from neutral buildings only buy them and i think in dota ... is used something similar to what i used but i don't yet know the complete way ...
07-16-2007, 11:06 PM#7
Earth-Fury
neutral buildings cannot train units for players like that. last i remember, its impossible to know who orderd the training of the unit.
07-18-2007, 04:12 AM#8
vesuvan doppleganger
Sorry to say this, but I looked at the dota code, and the function you describe has nothing to do with having 12 heroes in a tavern.

I have an idea though. Try setting the maximum number of trainable heroes to 0, and then setting it to 1. New icons cover old ones right?