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

Level up dead heroes.

Status
Not open for further replies.
Level 30
Joined
Feb 18, 2014
Messages
3,623
Normally you can pick all heroes and then change their levels however I don't think this works on dead heroes. But as an alternative, you can level up each heroes by storing them inside a variable array and then change their levels.
 
Level 15
Joined
Feb 7, 2020
Messages
398
I think you can set hero levels (or at the very least their experience) even when they are dead. I currently do that in my map with no problem.

However, another solution if level up functions don't work for dead heroes could be to add a boolean flag "shouldLevelUp[playerNumberHere]" (or w/e name) and set it to true for dead heroes when a boss is defeated.

When a hero respawns, check if that boolean is true and add a level, then set the flag to false. Or, per Warseeker, store the "current team level" as an integer and always set levels on respawn. I think there are a few ways to fix this. Did you try setting levels already for dead heroes?
 
Level 8
Joined
Jan 17, 2019
Messages
163
Not really.

A unit dies

Dying unit Equal to Boss X

For each 1 to MaxHeroes do : Set level of Hero[Integer A] to (Level of Hero[Integer A] + 1]

Hmm are you sure that will work when they are dead though? It seems very similar to the triggers I'm using.


I think you can set hero levels (or at the very least their experience) even when they are dead. I currently do that in my map with no problem.

However, another solution if level up functions don't work for dead heroes could be to add a boolean flag "shouldLevelUp[playerNumberHere]" (or w/e name) and set it to true for dead heroes when a boss is defeated.

When a hero respawns, check if that boolean is true and add a level, then set the flag to false. Or, per Warseeker, store the "current team level" as an integer and always set levels on respawn. I think there are a few ways to fix this. Did you try setting levels already for dead heroes?

That actually sounds like it might be on the right path, setting a integer trigger check for when a hero revives!
 
Status
Not open for further replies.
Top