• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Hero Chooser

Status
Not open for further replies.
Level 1
Joined
Sep 28, 2014
Messages
4
I have a little issue with a trigger.

I have heroes in a tabern and I want to when someone click his hero to start to play. The chooser dies.

Thanks ^^:grin:
 

EdgeOfChaos

E

EdgeOfChaos

You want the chooser to die instantly? That doesn't require an array:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • Unit - Remove (Buying unit) from the game
Add Unit Type condition to check that the chooser is the one buying.
 
Level 1
Joined
Sep 28, 2014
Messages
4
Thanks it works :D

But it works for a single chooser. But how I do it for 5 wisp that have to choose hero and not die all when just one pick ?
 
Level 17
Joined
Mar 21, 2011
Messages
1,610
the trigger EdgeOfChaos gave you should work, but this is what deathismyfriend means:

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Chooser[1] = Chooser 0001 <gen>
      • Set Chooser[2] = Chooser 0002 <gen>
      • Set Chooser[3] = Chooser 0003 <gen>
      • Set Chooser[4] = Chooser 0004 <gen>
      • Set Chooser[5] = Chooser 0005 <gen>
  • Pick
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is a Hero) equal to True
    • Actions
      • Unit - Remove Chooser[(Player number of (Triggering player))] from the game
EDIT: the indexes given to the choosers have to be the same as the player number.
Chooser[1] has to be controlled by player 1 etc..
 
Status
Not open for further replies.
Top