• 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.

[Trigger] use a taver only 2 times?

Status
Not open for further replies.
Level 6
Joined
Apr 30, 2008
Messages
153
i want a trigger so that you can get your hero out of the tavern when the game starts.
after your hero dies you can get your unit only one more time say
revive hero and the unit standing by the tavern gets killed or you get locked out of the tavern
 
Level 4
Joined
Jul 23, 2007
Messages
129
The simplest would be to charge 1 lumber per hero and allow each player to only have 2 lumber during the game.

Or create an integer array called herocount and do this:

  • Events:
    • Unit - Unit enters (hero pick zone)
  • Conditions:
    • Triggering unit is a hero equal to true
  • Actions:
    • Set herocount(player number of(owner of (triggering unit))) to (herocount(player number of(owner of (triggering unit))) + 1).
  • If, then, else...
    • Conditions:
      • herocount(player # of (owner of ((triggering unit))) greater than or equal to 2
    • Actions:
      • Pick every unit owned by (owner of triggering unit) in (hero pick zone) matching (unit type of matching unit equal to (tavern user)) and kill picked unit.
 
Last edited:
Level 2
Joined
Dec 2, 2007
Messages
14
Make a trigger counting the number of units by the tavern.
If you're using a unit to buy the hero, set the boolean to units = 2; if you can just buy without unit, set boolean to units in region = 1. Every time that happens, add one to a variable. Once that variable hits 2, remove the tavern.
 
Status
Not open for further replies.
Top