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

Detect level of a hero

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
Using GUI is it possible to set up a trigger that can detect what level a hero is, save this value as a integer then give the hero level as gold

EG player has a level 6 hero, they receive 6 Gold

The part im having the most problem with is the detection of levels
 
Level 3
Joined
Sep 11, 2004
Messages
63
It's a bit tricky, because you need to store hero in question in a global unit variable to get level from, since get level is not generic unit event.
 
Level 10
Joined
Apr 3, 2006
Messages
535
thanks for the speedy reply, i understand how your doing it, but im having trouble setting the integar, would you be able to put it into a map? many thanks and +rep both of you
 
Level 10
Joined
Apr 3, 2006
Messages
535
okay i got it working with this

  • Untitled Trigger 002
    • Events
      • Player - Player 1 (Red) types a chat message containing load as An exact match
    • Conditions
    • Actions
      • Set player1lvl = (Hero level of player1camera)
      • Player - Set Player 1 (Red) Current lumber to (player1lvl + (Player 1 (Red) Current lumber))
thanks again for the help
 
Status
Not open for further replies.
Top