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

[General] player can summon 3 heroes from tavern.

Status
Not open for further replies.
Level 15
Joined
Jul 9, 2008
Messages
1,552
this will limit the training of heros to 1

  • hero limit
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Unit-type of (Triggering unit)) is A Hero) Equal to True
    • Actions
      • Player - Limit training of Heroes to 0 for (Owner of (Triggering unit))
 
Level 8
Joined
Mar 23, 2007
Messages
302
But the problem doesnt say anything bout what u want it to do?

So just a guess leads me, u want it to just summon 1 hero max.

There are mutiple ways, i would suggest u to use triggers and set Hero Limit for player X to 1.

edit : @ millzy, u ownd me :)
 
Level 4
Joined
Apr 15, 2011
Messages
108
but if I use trigger way, and then when later "playes" construct altars, they cant summon heroes anymore ?
 
Just do:
  • Player Group - Pick every player in (All players) and do Actions
    • Loop - Actions
      • Player - Limit training of <hero unit type> to 1 for (Picked player)
At map initialization trigger. Repeat procedure for each hero-type unit.

It will disable players from having more than 1 hero of each type at a time. And ofcourse when hero dies, he is still able to be resurrected at altar.
 
Level 4
Joined
Apr 15, 2011
Messages
108
Just do:
  • Player Group - Pick every player in (All players) and do Actions
    • Loop - Actions
      • Player - Limit training of <hero unit type> to 1 for (Picked player)
At map initialization trigger. Repeat procedure for each hero-type unit.

It will disable players from having more than 1 hero of each type at a time. And ofcourse when hero dies, he is still able to be resurrected at altar.

got it.

BUT WAIT, my tavenr has 12 hero... he can pick one of them, then other..
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Set Hero_count[(Player number of (Owner of (Sold unit)))] = (Hero_count[(Player number of (Owner of (Sold unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Hero_count[(Player number of (Owner of (Sold unit)))] Greater than or equal to 2
        • Then - Actions
          • Unit - Remove (Sold unit) from the game
        • Else - Actions
 
Level 4
Joined
Apr 15, 2011
Messages
108
  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Set Hero_count[(Player number of (Owner of (Sold unit)))] = (Hero_count[(Player number of (Owner of (Sold unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Hero_count[(Player number of (Owner of (Sold unit)))] Greater than or equal to 2
        • Then - Actions
          • Unit - Remove (Sold unit) from the game
        • Else - Actions
this not even a fix...
Download the test map below.
this looks like what I wanted, I aint sure tho. I will submit another post incase any kind of problem happens.
@RLstorm; have you set gameplay constants and object editor data so future heroes requires hall on hiegher level?
yup. but the problem is first hall :/
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
I'm sure that's what you want (based from my test map)

I used a removal of Hero-limit for that Player instead of limiting the game (affects everyone) to only 1 Hero per player

My system is like DotA game, where once you've chosen a hero, you will see nothing but a blank box at the Tavern.
 
Status
Not open for further replies.
Top