• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Limit Heroes to 1 per Game?

Status
Not open for further replies.
Level 22
Joined
Mar 16, 2008
Messages
1,027
I want to disable hero type for all players when a player begins training that hero. So there are 8 players that train up to 22 heroes from their altars (only allowed one and they cannot "-repick"). We were thinking limit the heroes to one per type. So only one player could play Paladin, for example. We won't have two of the same hero type. Does that make sense?

I was thinking make the unit-type of training unit unavailable upon event "begins training unit" (this event response "training unit" does not exist because the unit does not exist yet). I can't think of a good way to do this? Anyone have any ideas?
 
Last edited:
Trained Unit-Type is not in the standard Event Response list where you'd expect it, but instead in the base Function list, it's a little confusing:

1719599557547.png


At least that's how it works until the Unit actually exists, then it becomes the (Trained unit).
 
Last edited:
This seems to work on simple LAN tests:

  • Limit Heroes Train
    • Events
      • Unit - Altar of Knights 0225 <gen> Begins training a unit
      • Unit - Altar of Knights 0226 <gen> Begins training a unit
      • Unit - Altar of Knights 0227 <gen> Begins training a unit
      • Unit - Altar of Knights 0319 <gen> Begins training a unit
      • Unit - Altar of Knights 0320 <gen> Begins training a unit
      • Unit - Altar of Knights 0326 <gen> Begins training a unit
      • Unit - Altar of Knights 0340 <gen> Begins training a unit
      • Unit - Altar of Knights 0342 <gen> Begins training a unit
      • Unit - Altar of Knights 0343 <gen> Begins training a unit
      • Unit - Altar of Knights 0341 <gen> Begins training a unit
      • Unit - Altar of Knights 0352 <gen> Begins training a unit
      • Unit - Altar of Knights 0504 <gen> Begins training a unit
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Trained unit-type) Unavailable for training/construction by (Picked player)
  • Limit Heroes Cancel
    • Events
      • Unit - Altar of Knights 0225 <gen> Cancels training a unit
      • Unit - Altar of Knights 0226 <gen> Cancels training a unit
      • Unit - Altar of Knights 0227 <gen> Cancels training a unit
      • Unit - Altar of Knights 0319 <gen> Cancels training a unit
      • Unit - Altar of Knights 0320 <gen> Cancels training a unit
      • Unit - Altar of Knights 0326 <gen> Cancels training a unit
      • Unit - Altar of Knights 0340 <gen> Cancels training a unit
      • Unit - Altar of Knights 0342 <gen> Cancels training a unit
      • Unit - Altar of Knights 0343 <gen> Cancels training a unit
      • Unit - Altar of Knights 0341 <gen> Cancels training a unit
      • Unit - Altar of Knights 0352 <gen> Cancels training a unit
      • Unit - Altar of Knights 0504 <gen> Cancels training a unit
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Trained unit-type) Available for training/construction by (Picked player)

1719610891715.png
 
Last edited:
Status
Not open for further replies.
Back
Top