• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

[General] No limitation to custom heroes

Status
Not open for further replies.
Level 8
Joined
Aug 18, 2015
Messages
165
Hey there!

In my Leafshade map, I've started to work on additional two heroes for each playable race to spice up the game a little. However, I encounter a small difficulty as some of these heroes can be trained as many times as the player wants.

I checked the starting triggers and the heroes are supposed to be limited to 1 each.

Any idea what causes this and how to fix it?

Thanks a lot!
 
Level 8
Joined
Aug 18, 2015
Messages
165
Have you already checked; Advanced>Gameplay Constants>Techtree Equivalents - Hero?
Put your custom heroes on it.

I don't see that line in the Advanced menu :eek: All I have is the numerous Altar and outpost tier lines.

not only that, he might also want to re-think the requirements (townhall, keep, castle)
This was one of my first thoughts too. Sadly, it did not work :/

Thanks for your kind answers, guys!
 

Attachments

  • Techtree.PNG
    Techtree.PNG
    638.3 KB · Views: 153

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,863
Try this one:
  • Limit Hero Training
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • ((Trained unit-type) is A Hero) Equal to True
    • Actions
      • Player - Limit training of (Trained unit-type) to 0 for (Triggering player)
Haven't tested it.
 
Level 8
Joined
Aug 18, 2015
Messages
165
Hey! Thanks for this trigger. It is part of the solution! Though the player cannot do another of the same hero once the training order is complete, according to my tests the player can still have his multiple copies by ordering a queue of the same heroes. So, what I would need then is an adjustement to your trigger that prevents adding the same heroe several times in a row to the queue whilst the 1st is still training. Am I clear? Not sure ^^
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,863
A unit begins training a unit -> Limit training

A unit cancels training a unit -> Remove the limit

That being said, limiting training in response to "a unit begins training" might cancel the first unit being trained.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,898
Try this one:
  • Limit Hero Training
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • ((Trained unit-type) is A Hero) Equal to True
    • Actions
      • Player - Limit training of (Trained unit-type) to 0 for (Triggering player)
Haven't tested it.
Not with that event, it should be placed on a trigger that runs once like initialization, and limiting it to 1 instead of 0.
So either choose the Uncle's idea or use gameplay constants.
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,863
Oh, yeah... I don't know what I was thinking. Running it at initialization would be best I imagine.

That being said, i'm still confused as to how he's even able to queue more than 1 of the same hero at a time.
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,345
No it did not. It seems it only works for the official heroes :(

ah yes, I have faced this problem before: solution is easy.


Basically the game doesnt know what exactly is a hero. You have to tell the game who is hero.

Go to: GamePlay Constants>Hero equivalent> you will see a list here of official heroes, add your custom heroes here.

For example, you will see paladin in this list, you will see Blood mage here too, but you will not see Arthas or Jaina here because they are campaign heroes.

add your custom heroes to this list and they will count as a hero

Hope this helps


I wrote this for limitation (sorry, there are a couple words in French as my editor operates in my tongue). That doesn't work. Did I miss something?

View attachment 349909
I get the idea of your trigger. (but I think my solution above is easier). why wouldnt you instead say make unit unavailable action instead of limiting it to zero? I dont think there is a difference.

but also, if the hero is limited to 0, can the hero be revived?
 
Level 8
Joined
Aug 18, 2015
Messages
165
Hey guys, first of all, thanks for your kind help!


ah yes, I have faced this problem before: solution is easy.


Basically the game doesnt know what exactly is a hero. You have to tell the game who is hero.

Go to: GamePlay Constants>Hero equivalent> you will see a list here of official heroes, add your custom heroes here.

For example, you will see paladin in this list, you will see Blood mage here too, but you will not see Arthas or Jaina here because they are campaign heroes.

add your custom heroes to this list and they will count as a hero

Hope this helps



I get the idea of your trigger. (but I think my solution above is easier). why wouldnt you instead say make unit unavailable action instead of limiting it to zero? I dont think there is a difference.

but also, if the hero is limited to 0, can the hero be revived?

I think a problem here is I use the Reforged editor and in the current version, either I'm completely blind or the "Hero equivalent" thing doesn't exist in the GamePlay Constants anymore :(


That being said, i'm still confused as to how he's even able to queue more than 1 of the same hero at a time.
I guess, as they said, it's because the game don't recognize them as proper heroes :/


If you don't mind I can take a look at your map and try to find what's wrong.
Thanks, I'll attach the map in progress to this thread so you guys can get a closer look :)
 

Attachments

  • Leafshade_Reforged.w3x
    214.1 KB · Views: 46
Level 8
Joined
Aug 18, 2015
Messages
165
I dont think so.

though Im pretty sure you can do it in your version, you just havent tried enough.

Edit:Here I found it in 1.31

View attachment 349966


Gosh! Thank you! I looked about ten times without finding it. I'm definitely blind x) I thought there was everything but this line, aha!
After testing it, it seems I have to combine both solutions given and still use the trigger above because this list only means to the game the player is entitled to one hero per outpost tier. Which is half the problem solved. Now, I'll use the trigger to prevent them from taking the same hero several times!

With that, I think my problem is solved. Thank you guys so much for your time and considerate answers. You rock!!
 
Level 16
Joined
May 2, 2011
Messages
1,345
Gosh! Thank you! I looked about ten times without finding it. I'm definitely blind x) I thought there was everything but this line, aha!
After testing it, it seems I have to combine both solutions given and still use the trigger above because this list only means to the game the player is entitled to one hero per outpost tier. Which is half the problem solved. Now, I'll use the trigger to prevent them from taking the same hero several times!

With that, I think my problem is solved. Thank you guys so much for your time and considerate answers. You rock!!
tell us when its fully solved and working.
 
Status
Not open for further replies.
Top