HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

custom heroes (?)

12-21-2004, 09:26 PM#1
spitfire3297
Ok well heres a question for you professional people...I'm creating a custom melee map and I was going to add some custom tavern heroes in but when I test it and make one, it doesn't go away and i can make as many other heroes as I want until I make 3 normal heroes (Example: I made the Draenei hero and I made 5 of him before I made 3 original heroes) Could someone guide me through the process of this please.. :god_help_us:
12-21-2004, 09:33 PM#2
GreyArchon
Quote:
Originally Posted by spitfire3297
Ok well heres a question for you professional people...I'm creating a custom melee map and I was going to add some custom tavern heroes in but when I test it and make one, it doesn't go away

Why should your custom hero "go away"? And from where?

Quote:
Originally Posted by spitfire3297
and i can make as many other heroes as I want until I make 3 normal heroes (Example: I made the Draenei hero and I made 5 of him before I made 3 original heroes)


You made 5 Dreanei heroes in WorldEdit? Or hired 5 of them at the tavern?

Quote:
Originally Posted by spitfire3297
Could someone guide me through the process of this please.. :god_help_us:

Not until you give a better explanation of your problem..
12-21-2004, 09:37 PM#3
spitfire3297
Quote:
Originally Posted by GreyArchon
Why should your custom hero "go away"? And from where?



You made 5 Dreanei heroes in WorldEdit? Or hired 5 of them at the tavern?



Not until you give a better explanation of your problem..

well what i meant by go away is the icon in the tavern as i hire them
i made 5 at the tavern
12-21-2004, 09:56 PM#4
spitfire3297
this time i fixed the part where i could have more than 3 heroes but i was able to make them all the same person thats the last problem i have if you can help me with that
12-21-2004, 11:30 PM#5
Bibendus
On standard melee maps heroes get deleted from tavern or altair when you get them tx to this trigger:

Melee Game - Limit Heroes to 1 per Hero-type (for all players)

That contains this code:
Code:
function MeleeStartingHeroLimit takes nothing returns nothing
 	local integer index
 
 	set index = 0
 	loop
 		// max heroes per player
 		call SetPlayerMaxHeroesAllowed(bj_MELEE_HERO_LIMIT, Player(index))
 
 		// each player is restricted to a limit per hero type as well
 		call ReducePlayerTechMaxAllowed(Player(index), 'Hamg', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Hmkg', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Hpal', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Hblm', bj_MELEE_HERO_TYPE_LIMIT)
 
 		call ReducePlayerTechMaxAllowed(Player(index), 'Obla', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Ofar', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Otch', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Oshd', bj_MELEE_HERO_TYPE_LIMIT)
 
 		call ReducePlayerTechMaxAllowed(Player(index), 'Edem', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Ekee', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Emoo', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Ewar', bj_MELEE_HERO_TYPE_LIMIT)
 
 		call ReducePlayerTechMaxAllowed(Player(index), 'Udea', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Udre', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Ulic', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Ucrl', bj_MELEE_HERO_TYPE_LIMIT)
 
 		call ReducePlayerTechMaxAllowed(Player(index), 'Npbm', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Nbrn', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Nngs', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Nplh', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Nbst', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Nalc', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Ntin', bj_MELEE_HERO_TYPE_LIMIT)
 		call ReducePlayerTechMaxAllowed(Player(index), 'Nfir', bj_MELEE_HERO_TYPE_LIMIT)
 
 		set index = index + 1
 		exitwhen index == bj_MAX_PLAYERS
 	endloop
 endfunction



You could make a trigger like this, i didnt test it but it should work:

Code:
Only 1 Hero x Type
 	Events
 		Unit - A unit Sells a unit
 	Conditions
 		(Unit-type of (Selling unit)) Equal to Tavern
 	Actions
 		Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Owner of (Sold unit))
12-21-2004, 11:52 PM#6
spitfire3297
thanks it worked great