Using Campaign Heroes Question

nandosman

New Member
Reaction score
4
Hello, this the problem:

I want a ffa map from warcraft3, with only one difference. I want the campaign heroes there instead of the normal ones, but i can not make them unique, for example, when i begin training arthas from the Altar of Kings, the hero button doesnt dissapear, so it will let you train multiple arthas, how do I fix this?
 

Hellforce

New Member
Reaction score
2
It's easy you just need to have this:
Trigger:
  • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
 

Hellforce

New Member
Reaction score
2
Well this is definitely not the best idea but try this:
Trigger:
  • Training
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of <your hero1> to 1 for (Picked player)
          • Player - Limit training of <your hero2> to 1 for (Picked player)
          • Player - Limit training of <your hero3> to 1 for (Picked player)
          • -------- And so on, you got the idea --------
 

nandosman

New Member
Reaction score
4
That worked fine for me, but why do u say its not the best idea? does that solution produces lag or something like that? anyway thank you very much for your help, that resolved my problem =)
 

Hellforce

New Member
Reaction score
2
That worked fine for me, but why do u say its not the best idea? does that solution produces lag or something like that? anyway thank you very much for your help, that resolved my problem =)

Not that it produces lag or anything but i meant that, if you had 50+ heroes, you'd had to limit training for every single one of them.
 

Hellforce

New Member
Reaction score
2
when a unit starts training a unit set the limit of trained unit to 1, very easy way.

I tried that but it didn't work because of the starts training doesn't work with trained unit. For trained unit it has to be finishes training a unit. And if it's a unit finishes training a unit and set the limit of trained unit to 1, there's a leak: when you start training the unit before the unit is trained you can press the button to train it again and although after the first unit is trained the button for training will disappears if you have started training another unit of that type before the first unit is trained, it will still be trained.
 

nandosman

New Member
Reaction score
4
Not that it produces lag or anything but i meant that, if you had 50+ heroes, you'd had to limit training for every single one of them.

mmm true, u got a point there, luckily i ve just a few heroes =)

when a unit starts training a unit set the limit of trained unit to 1, very easy way.

If u do that, wouldn't it limit all your units to 1?
 

nandosman

New Member
Reaction score
4
Now there's this situation.If i'm using Undeads, I've 6 options for dreadlords, then i need to limit it to just 1 dreadlord, now its not only limiting unit type to 1, but to make other heroes of type Dreadlord unselectable once you have chosed one :/
 

Hellforce

New Member
Reaction score
2
Ok this isn't a very good solution (because you'll have to have a different building made for building only dreadlords):
the start building trigger:
Trigger:
  • Dreadlord begins construction
    • Events
      • Unit - A unit Begins training a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to <your altar>
    • Actions
      • Player - Make <dreadlord1> Unavailable for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord2> Unavailable for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord3> Unavailable for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord4> Unavailable for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord5> Unavailable for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord6> Unavailable for training/construction by (Owner of (Triggering unit))


and in case it is canceled:
Trigger:
  • Dreadlord cancels construction
    • Events
      • Unit - A unit Cancels training a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to <your altar>
    • Actions
      • Player - Make <dreadlord1> Available for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord2> Available for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord3> Available for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord4> Available for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord5> Available for training/construction by (Owner of (Triggering unit))
      • Player - Make <dreadlord6> Available for training/construction by (Owner of (Triggering unit))
 

Bird

Ultra Cool Member
Reaction score
29
Er, I believe the real solution is... Advanced -> Gameplay Constants -> Techtree - Dependency Equivalents - Hero.

You need to add the Campaign Heroes to this list.
 

punwisp

New Member
Reaction score
34
Well this is definitely not the best idea but try this:
Trigger:
  • Training
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of <your hero1> to 1 for (Picked player)
          • Player - Limit training of <your hero2> to 1 for (Picked player)
          • Player - Limit training of <your hero3> to 1 for (Picked player)
          • -------- And so on, you got the idea --------


He really doesn't need triggers, all he has to do is go to gameplay constants, and go close to the bottom and



That circled part goes along with that melee triggerthat limits 1 per hero type, which means a player can only have 1 of the same hero. It works because it uses the heroes listed in the circled part.

GO to gameplay constants, click at the top right of the window, and click customize gameplay constants, something like that, go to the bottom where I circled it, and add the heroes to the list.

Then BAM, a player can only have 1 to each. Now if you want a hero LIMIT , thats where triggers come in. I can post a screen if you want.


Also remember these campaign heroes likely wont have tooltips, so it will show "tooltip missing" Just fill in the bottom 3 sections of the editor, The name, Its learn I think (Like Train footman) Then description
 
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