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

Heroes to 1 per unit-type

Status
Not open for further replies.
Level 4
Joined
May 1, 2011
Messages
81
Hello there. I have problems with the hero selection from a melee map.

EDIT: I've been struggling with this for a while. I am working on making another race for the melee game yet I can't figure out how to make a Hero free (only food) for the first purchase and then cost 425 gold and 100 lumber as well as 5 food for the second and third times. Also, when the first Hero is chosen, the specific Hero that I choose reappear again as if I can build another one.
Anyone know how to do this? I just haven't been able to figure it out...

I've added every new hero and building to the respective places in the Gameplay Constants too.
 
Last edited:
Level 4
Joined
May 1, 2011
Messages
81
u use the melee start trigger? there should be somethin like -limit each hero by one per hero typ

Yeah, which is why I have tried the Melee Game in that trigger already. Sorry only work for default Heroes. I'm talking about Custom Heroes trained from an Altar.

got to advanced - gameplay constants, select use Custom Gameplay Constants.
scroll down to Techtree - Dependancy Equivalents - Hero and add your hero to it.

I'm afraid that won't work either. That don't give me free Hero for the first Tier. And also, I'm allowed to use the same Hero again, which I want to disable this f*cking stupid bug. Any more suggestions?
 
Level 5
Joined
Sep 1, 2010
Messages
168
event - unit enters playabable map area
condition - triggering unit is a hero == true
actions - make triggering unit unavailable for training for owner of(triggering unit)
/*If you want the hero to be unable to be picked by everyplayer instead pick all players and make triggering unit unavailable for training for picked player*/

Solves at least the double hero stuff.

About the other part I have no clue how to properly solve.
A bad fix at least would be to make all heroes exsting doubled (give different names by editor suffix like food only and costly hero).
Manually add unit to the desired altair/tavern via trigger, and remove them the same way. In addition, when a player buys the 1st hero, remove for him all (food only) heroes and instead add the costly variants. (this way you'll have to check when a hero enters a map which one it is and make his and the doubled unit-type unavailable for training for triggering player.. it's a lot of coding for something very simple, but at least it's a work-around..).
 
Level 4
Joined
May 1, 2011
Messages
81
Nah never mind. For the last minute, I've just found out the true way to solve this problem. Here's how I did just so how to share with anybody who wants to read this:


My 1st condition: I want to make it such that the 1st Hero chosen from an Altar will be given free (except the food cost), but the future ones will cost with both gold and wood.

Solution:

Action
Player - Set (All the players) Available free Heroes to 1 (DONE)

My 2nd condition: When the Hero was chosen, you cannot choose that specific Hero anymore. The Hero-type quantity will always be = 1, but never > 1.

Solution: I actually look at other forum sites before I start asking this question. A guy was asking the same question long before I ask. The people who gives him the solution would be modify the Object Editor's Stock - Stock Replenish Interval to 3600. This is not a good solution because eventually, you still will able to create another same Hero after one hour. For @ThaAthael's solution:

event - unit enters playabable map area
condition - triggering unit is a hero == true
actions - make triggering unit unavailable for training for owner of(triggering unit)
/*If you want the hero to be unable to be picked by everyplayer instead pick all players and make triggering unit unavailable for training for picked player*/

That's not a good solution. I can create two or three same Heroes using the cheat code 'Warpten', because it only says as long as a foot was stepped in the land by the Hero. So, training it from the Altar doesn't mean the Hero already step out from the Altar. However, after hours of research, I did not realize this:

Action:
Player - Limit training of Rexxar(Custom) to 1 for (All the players). (DONE)

Because this was a specific Hero, hence you need to create variables. That's another story to tell. Basically I was saying that like this example, you cannot create more than one Rexxar(Custom). And when it was training (under training), the selection button of that chosen Hero will instantly disappear on your bottom right of your screen.

That should work for everyone who are creating a new hero for new race (although some of the custom race could be related to the original race). In this case I was making Fel Orc. So I was using mostly Orc's buildings and the Blademaster as the new hero
 
Status
Not open for further replies.
Top