• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Heroes limit

Status
Not open for further replies.
Level 5
Joined
Nov 22, 2015
Messages
17
Hi,

I limited the number of heroes players can have to 3, and to 1 for each hero-type.

The problem is that in my map, players can reselect a race when they want. By doing that, all their units (units, buildings, heros, ...) become neutral hostile.

But even after that, the game still considers the player to have made the heroes he trained. On the left of the screen, you no longer see your previous heroes but in your altar, those heroes no longer appear. And for exemple, if you made 1 hero, after changing your race you will no longer be able to make 3 heroes, you can make only 2 heroes instead. And if you didn't upgraded your townhall, you will need to upgrade it to make your first hero (the game considers it as your 2nd hero).

I already tried to remove player's units when he changes his race, but it didn't work, the game still consider you made heroes.

Help please. :)
 
Level 5
Joined
Nov 22, 2015
Messages
17
To change his race the player has to type "-race" in the chat.

Then I made a dialog with buttons in which he can select his race.

When he clicks on a button, his previous units become neutral hostile and new workers spawn.

Edit : I added a map to show you.
Build an altar and train a hero.
Then type -race.
Reselect the same race.
Build another altar and see.

Well I found a solution.

I put the map if someone wants to know how to do.

I only did triggers for human race, on others races it doesn't work.

There is still a problem with my solution : you have to remove hero requirements because, for exemple, if you do 1 hero and change race after, you will need to upgrade the townhall to make an other hero.

So if someone has another idea, he will be welcome. :)
 

Attachments

  • Select a Race.w3m
    13.8 KB · Views: 34
  • Select a Race.w3x
    14.9 KB · Views: 85
Last edited by a moderator:
Status
Not open for further replies.
Top