• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Tavern problem (how to store sold heroes into an array)

Status
Not open for further replies.

newimmortal24

N

newimmortal24

So yeah im making a map which you need to pick heroes in the tavern...
so i want the hero i pick to add in an unit array variable so i can transfer him into another region if needed
thx sorry for the bad english hard to explain
 
I guess Unit Indexer may be usefull for you.

Create unit array variable in GUI variable editor and with UI usage try:
  • init
    • Events
      • Unit - A unit Sells unit
    • Conditions
      • // here either use unit-type comparison related to bought unit or
      • // the tavern in which hero has been bought
    • Actions
      • Set Unit[(Custom value of (Sold Unit))] = (Sold unit)
EDIT: Sorry baassee didn't know you have replied, I was writing trigger as freshhand so it look me a while =o.
 
So whats Integer counter for?? srry vry new to this
 
Status
Not open for further replies.
Back
Top