Trigger - "Limit Heroes to 1 per Hero-type (all players)" not working!

P

Plasmacaster

Guest
Well I've checked the tavern tutorial and the hero arena tutorial, I've tried to work out what's wrong but I can't seem to manage it. Which is why I am asking for your help.

Basically I have created a melee map which has the original racial heroes, the tavern heroes, and now an extra 12 heroes through another tavern.

There are various cosmetic issues that I'm working through but the most irritating one is that for some reason, the trigger that prevents multiple heroes from being bought isn't working.

The player can still only select one hero per tech level but you could for example on tier 1 buy the "Frost Lord" and once tier 2 has been reached, you could buy another "Frost Lord".

I'm fairly certain that its not to do with the game constants or the unit properties, I've gone through them both many times trying to figure out why its not working.

I've used neutral heroes like the Firelord as templates for the units and only changed what was necessary (such as abilities and model files etc...)

Could someone suggest a trigger or something that I could use to reinforce the selection process?

Ah I don't know JASS so i'm afraid that wouldn't help me much but if you could explain it to me I might be able to get it. :) I'm a quick learner.

Thanks in advance to everyone who helps.

Plasmacaster
 
O

OmgWtfBacon

Guest
I'm pretty sure its under stock maximum. look under that and stock replenishment under the hero your working on.
 
P

Plasmacaster

Guest
Code:
Stats - Stock Maximum             1
Stats - Stock Replenish             0
Stats - Stock Start Delay          135


I've checked against other neutral-purchasable heroes. This is the same for them also.
 
O

OmgWtfBacon

Guest
Plasmacaster said:
Code:
Stats - Stock Maximum             1
Stats - Stock Replenish             0
Stats - Stock Start Delay          135


I've checked against other neutral-purchasable heroes. This is the same for them also.
Change stock maximum to 2 (if you want to be able to buy 2 heros), Change replenish to 1, if you want it to replenish.
 
P

Plasmacaster

Guest
.....I think you may have misunderstood.

I have no desire to purchase multiple units or replenish. I merely wish for the heroes in this tavern to act in the same way as the heroes in the other tavern.

I would like there to be a limit on the number of hero types available for purchase per side.

In the same way that you can only purchase one pandaren brewmaster or one naga sea witch I wish to make it so that it is only possible for a player to purchase a maximum of one type.

I have identified that there is a trigger which causes this function to occurr during a normal melee game however, for some reason the new heroes are not being included and as such, it is possible to buy more than one hero of the same type - which is not what I want at all.

Ordinarily when purchasing heroes from a tavern, once the unit is bought, there is a blacked out square where the hero used to be to prevent multiple purchases. This is not happening with the new tavern.
 
O

OmgWtfBacon

Guest
I think there is a trigger to remove the hero from the tavern after it is bought.... um..... I can give you a little bit of the trigger that can hold you over until someone else comes along.
Event;;;;
>>> A Unit Finishes training
Condition;;;;
>>>(Triggering Unit) is Equal to Naga Sea Witch
Action;;;;
>>>Remove (Naga Sea Witch) from Tavern.

that last part ISN'T right, I I'm pretty sure the event and condition are. Look around in World editor, you should be able to figure it out. Open up one of warcrafts maps that have a tavern. and look around in those triggers.

But if you're trying to make it to where the hero is not purchaseable, I'd do this editing:

Stock maximum : 1
Stock star delay: 50
Stock Replenish: 3600

I'm pretty sure theres another thing you change to make it to where the shop only carries one of the heroes, actually...
 
P

Plasmacaster

Guest
Just been checking other posts and found this:

Effane said:
To make it so players cant pick the same hero twice in the entire map there are two ways to do it.

A) Remove the selection from the training source. IE make it un trainable from the building/vendor.

B) Set the Stats - Restock Time on the unit to insanely large. I think 3600 is the highest you can set in the unit (its in seconds, that comes out to 60 minutes, you should be able to boot a player that hasnt picked anything by then and disallow repicks). Make sure you set amount in supply to 1.


B is the MUCH easier way, but its not as pretty. And it wont work in all setups. You will then have to do A if its a more unusual setup or the stocks arent the same for each building for some reason.

I would prefer 'A' to make it neater, but if I have to use 'B' would that prevent other people from obtaining the same hero?

Ideally I'd like for each player to be able to buy the same unit if they wanted. Just like regular tavern heroes.

Thanks for the trigger, but once again its preferable to be able to allow other players to obtain the same hero. The trigger would remove the ability for other units to purchase it.

I mean if worst comes to worst I can do it in that fashion. Set up a few multiple instances of the tavern and allow each one to have a stock that takes forever to cooldown. I was just hoping for an alternative.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
There's a list in the gameplay constants with all units that are to be considered Heroes.

"Techtree - Dependency equivalents - Hero", you'll know it when you see it.


There would also be "Player - Disable training/construction of unit for player",
once a player got his Hero, you use it to disable all other possible Heroes.
 
P

Plasmacaster

Guest
AceHart said:
There's a list in the gameplay constants with all units that are to be considered Heroes.

"Techtree - Dependency equivalents - Hero", you'll know it when you see it.


There would also be "Player - Disable training/construction of unit for player",
once a player got his Hero, you use it to disable all other possible Heroes.

I knew about the "Techtree - dependency equivelants - Hero", it was in this tutorial. But i've had a quick check and didn't see anything like the "Player - Disable training/construction of unit for player" -

TBH that sounds morelike something that would appear as a trigger, are you sure its in the gameplay constants or that there is no word in front of it? In the gameplay constants menu there is nothing that begins with the word 'player'
 
O

OmgWtfBacon

Guest
Plasmacaster said:
I knew about the "Techtree - dependency equivelants - Hero", it was in this tutorial. But i've had a quick check and didn't see anything like the "Player - Disable training/construction of unit for player" -

TBH that sounds morelike something that would appear as a trigger, are you sure its in the gameplay constants or that there is no word in front of it? In the gameplay constants menu there is nothing that begins with the word 'player'
The only place where it begins with 'Player - ', is in the triggers section. set the event to map initialization if you want to use this.
 
P

Plasmacaster

Guest
Ah I'm not about to start using triggers. They're not massively complex but I'm just too rusty. Last time I used them was a year ago when I made a 7-level campaign.

Think i'll just give the insanely long cooldown period and put up a bunch of taverns to allow other people to buy them.

Thanks to both of you.
 
S

Smewhen

Guest
If you add more then one tavern, cant a player just buy the same guy from a different tavern? And the long cool down is only an hour, most melee games take more then one hour. Blizzard seems to have skimped on a lot of the background stuff for customized things so I dont know if theres any real way to stop them from getting the same hero twice without getting rid of the source of that hero for everyone.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top