• 🏆 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!

Hero Selection Problem

Status
Not open for further replies.
Level 5
Joined
Oct 20, 2019
Messages
60
Hello, i have two problems regarding the hero selection system in my map, i'm also new to triggers so please go easy on me =)

So the first problem is, that i currently have 5 heroes to choose from but 1 player can pick all 5 of them, leaving the rest of the players unable to pick anything
I would like to have each player only be able to pick 1 hero and then no more

The second problem is, that when a hero dies, he turns up in the hero selection tavern and when you click on him he instantly revives but at the wrong location right next to the tavern
How do i fix it so that you wont be able to instant revive your hero and end up in the wrong location?
 

Attachments

  • 2019-10-22 (1).png
    2019-10-22 (1).png
    214 KB · Views: 48
  • 2019-10-22 (2).png
    2019-10-22 (2).png
    72.1 KB · Views: 29
  • 2019-10-22.png
    2019-10-22.png
    88.3 KB · Views: 28
Level 9
Joined
Sep 20, 2015
Messages
385
For the first problem the first suggestion that came to my mind is that if every player choose their hero with a tavern there must be a starting unit to be able to select it(like a wisp), so when a player select a hero you remove the wisp and they can't pick another one.

For the second problem the solution is easy, the tavern has an ability called "Revive Hero Instantly", you can just remove it from the Object editor and when a hero is dead it's not possible to revive with the tavern anymore.

EDIT: Actually, after i read my comment again i think that the first solution can solve both problems, since the player can't use the tavern if there are no units nearby. But be aware that if a player share unit control with another and the first one has a unit near the tavern the second can use the tavern
 
Last edited:
Level 5
Joined
Oct 20, 2019
Messages
60
For the first problem the first suggestion that came to my mind is that if every player choose their hero with a tavern there must be a starting unit to be able to select it(like a wisp), so when a player select a hero you remove the wisp and they can't pick another one.

For the second problem the solution is easy, the tavern has an ability called "Revive Hero Instantly", you can just remove it from the Object editor and when a hero is dead it's not possible to revive with the tavern anymore.

EDIT: Actually, after i read my comment again i think that the first solution can solve both problems, since the player can't use the tavern if there are no units nearby. But be aware that if a player share unit control with another and the first one has a unit near the tavern the second can use the tavern


Thanks for the advise about the wisp, hopefully it solves both problems =)
+ rep
 
Level 7
Joined
Jul 4, 2007
Messages
249
Or just make them cost food, or maybe lumber if it's not obtainable any other way before you pick a hero.
For the second problem you can just put a region around the tavern and make a trigger, when unit enters region, move to other region.
  • Events
    • Unit - A unit enters Tavern region
  • Conditions
  • Actions
    • Set tempLoc = (Center of Target region)
    • Unit - Move (Triggering unit) instantly to tempLoc
    • Custom script: call RemoveLocation(udg_tempLoc)
And if you want to revive in another way than from the tavern you can remove the ability "Revive Hero Instantly" from tavern and make a trigger for reviving instead
 
Last edited:
Status
Not open for further replies.
Top