• 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] world editor doesn't like me having lots of heroes within my map

Status
Not open for further replies.
Level 2
Joined
Nov 26, 2017
Messages
6
(first time asking a thing here, sorry if i'm not asking correctly)

as i just found out, the world editor can only have so many things counted as heroes before removing all ones below a certain threshold upon pressing the "ok" button to finish editing the "what counts as a hero" list... and i thought of making a "if [player] has more then 3 hero units then make them unable to train more" but, i will be honest... idk how to make a trigger like that... does anyone know how to fix the thing or make a trigger for it?

EDIT: i managed to find a solution (the one from the only answer so far did not work unfortunatly, but i managed to find one), moderators please move this to solved as idk how to... should i put the trigger i used here? the basics of it is making a upgrade, making it so training a hero will add a level to the upgrade, and making it so when the upgrade has gotten to max (2) it will limit all heroes to 0 rather then add another level to the upgrade.
 
Last edited:
Level 15
Joined
Jul 9, 2008
Messages
1,552
  • hero limit
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of Heroes to 3 for (Picked player)
  • [trigger]
 
Level 2
Joined
Nov 26, 2017
Messages
6
  • hero limit
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of Heroes to 3 for (Picked player)
  • [trigger]
thank you, i will test to see if this works... how do i give rep? just putting +rep into the message? ima guess that's how to give you rep
+rep
EDIT: it did not fix the problem... the problem is that some heroes don't count towards the hero limit because the gameplay constants don't want to have more then a certain number of heroes able to be counted towards the limit... still, ty for trying to help though
 
Last edited:
Level 15
Joined
Jul 9, 2008
Messages
1,552
  • HERO LIMIT
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Player - Limit training of (Unit-type of (Triggering unit)) to 0 for (Owner of (Triggering unit))
      • Set heroLimit[(Player number of (Owner of (Triggering unit)))] = (heroLimit[(Player number of (Owner of (Triggering unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • heroLimit[(Player number of (Owner of (Triggering unit)))] Equal to 3
        • Then - Actions
          • Player - Limit training of Heroes to 0 for (Owner of (Triggering unit))
        • Else - Actions
here this will work. alltho if the heros are trained from a altar and a player trains say 5 at once all 5 will b trained and it will not stop at 3. not sure what the work around this will be sorry.
 
Status
Not open for further replies.
Top