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

Can This Trigger Be Done? (set a hero's level to the highest in the entire game)

Status
Not open for further replies.
Level 8
Joined
May 7, 2007
Messages
278
Hi, I am currently creating a hero arena. Let me quickly explain what's going on. Here is my trigger:

  • Events
    • Unit - A unit Sells a unit
  • Conditions
  • Actions
    • Hero - Drop (Item carried by (Buying unit) in slot 1) from (Buying unit)
    • Hero - Drop (Item carried by (Buying unit) in slot 2) from (Buying unit)
    • Hero - Drop (Item carried by (Buying unit) in slot 3) from (Buying unit)
    • Hero - Drop (Item carried by (Buying unit) in slot 4) from (Buying unit)
    • Hero - Drop (Item carried by (Buying unit) in slot 5) from (Buying unit)
    • Hero - Drop (Item carried by (Buying unit) in slot 6) from (Buying unit)
    • Hero - Set (Sold unit) Hero-level to (Random integer number between 4 and 5), Show level-up graphics
    • Selection - Select (Sold unit) for (Owner of (Buying unit))
    • Unit - Remove (Buying unit) from the game


Now, heres what I need to happen. At the part where it says

  • Hero - Set (Sold unit) Hero-level to (Random integer number between 4 and 5), Show level-up graphics
I need it to "set the sold hero's level to (a hero's level who is the highest currently in the game)" ignoring hostile heroes...


I dont think this is possible in GUI, but if it is, I'd like to see it in GUI, if not, JASS is fine. If this is not possible, I am sorry to have wasted your time :(.
 
Level 9
Joined
Aug 1, 2008
Messages
453
make 2 variables (integers i think) and every time a hero levels up set the integer higher like this

  • Set Variable
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Hero level of (Triggering unit)) Greater than HIGHEST
    • Actions
      • Set HIGHEST = (HIGHEST + 1)
And change to were is set's the level to
  • Hero - Set (Sold unit) Hero-level to HIGHEST, Show level-up graphics
 
Status
Not open for further replies.
Top