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

Units with EXP bars

Status
Not open for further replies.
Level 2
Joined
Jul 7, 2012
Messages
8
I once played a map where you (the player) owned some units that had exp bars, but didn't display in the top left corner as heroes normally would. Could anyone give me some guidance on how i make units that can earn experience?
 
Level 2
Joined
Jul 7, 2012
Messages
8
Defskull, they were simple units that had the experience bar of a hero. I'm not sure whether or not they had the Str/Agi/Int attributes tho.

Also, thank you WhiteDeath. Gonna try this out right now.

EDIT: After trying out WhiteDeath's steps, I wasn't really satisfied with what I got, since i forgot to tell that I kind of wanted Units, and not Heroes (i basically didnt want any attributes, but i guess they are unavoidable).


Is there a way to create an EXP function for units using triggers?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
1. Make all units based on heroes and disable the hero icons for them.
But imagine if he makes a game based on armies, where each player can spawn armies at least 100 of them, meaning we have 100 Heroes.
Heroes are a unique unit in Warcraft III that cannot go just like that, compared to Normal Unit, when it dies, it truly dies (cannot be revived).

But I think we can counter this issue by removing the Hero when it dies.
In GUI, you can read the Note below the function box it says "Leave no corpse. If used on Hero, that Hero cannot be resurrected", this actually means that it will treat Hero Unit just as Normal Unit.

But I don't know if you remove Hero like 100 times it will cause bugs to the game or not.

This is the only viable solution I can think of, because the EXP Bar on the Unit's UI is hard-coded, meaning you can't simply make it via trigger or what, you must make it a Hero to enable that EXP Bar on the Unit's UI, unless you want it to have a Floating Text of EXP Bar (or Multiboard), you can use Normal Unit for it but this will mess up the game if you want to keep track like 100 Units at a time.
 
Level 14
Joined
May 22, 2010
Messages
362
You could probably make some sort of ability named experience that has 1000 levels, when the unit kills something increase the levels by an appropriate amount, and ckeck if the exp ability has reached the necessary amount, if so - level up the unit as you wish and decrease the level of the exp ability back to 0.
It may not be a xp bar but it is an xp icon:)
 
Level 7
Joined
Feb 9, 2010
Messages
298
I didn't really got the question, you want Normal Units with Exp. Bars OR you want Normal Units to Gain levels?

- If it is the second that you want - I've the solution, as I had this idea some time ago and now it's working on unit kill basis.

If you have interest in this ask me! I would gladly share my knowledge.
 
Last edited:
Status
Not open for further replies.
Top