I want to be able to display the total experience gained for a unit. So far I have been unable to find such a function. The reason I need this is I don't use levels but I do use experience as a means for rewards, money, advancement etc. The reason I am not using the total experience on the status bar is because I'm using that to display weapons and other useful information. So to tackle this issue, I made my own experience label at the top left of the screen underneath the heros health panels. However, the only function I could find was to convert integer to text and display the current heros level on the screen, not experience.
Sure wish I could display the total experience gained.
There is a function to get triggering experienced gained. You can easily use a variable to get XP gained or total XP overtime. Use real instead of integer for experience.
To give XP for an unit, you'll need a Effect of type Modify Unit, set the (Basic) Effect: Experience^ to the amount of XP you want to give to the unit (also you can change it using catalog function in trigger).
In trigger, use this to give xp: Create Effect On Unit (From Unit)
Also, there's a function to get XP if you want: Unit XP Get Current XP -> return real value
I want to be able to display the total experience gained for a unit. So far I have been unable to find such a function. The reason I need this is I don't use levels but I do use experience as a means for rewards, money, advancement etc. The reason I am not using the total experience on the status bar is because I'm using that to display weapons and other useful information. So to tackle this issue, I made my own experience label at the top left of the screen underneath the heros health panels. However, the only function I could find was to convert integer to text and display the current heros level on the screen, not experience.
Sure wish I could display the total experience gained.
Use Unit Gains Experience Event
There is a function to get triggering experienced gained. You can easily use a variable to get XP gained or total XP overtime. Use real instead of integer for experience.
@Prodigy454: Go
Yay!! Thank you so much!
@onlyleviathan: Go
Of course now I just noticed there is no function to give experience, so if your hero dies, BOOM. Gone. I don't suppose anyone has a work around?
To give XP for an unit, you'll need a Effect of type Modify Unit, set the (Basic) Effect: Experience^ to the amount of XP you want to give to the unit (also you can change it using catalog function in trigger).
In trigger, use this to give xp: Create Effect On Unit (From Unit)
Also, there's a function to get XP if you want: Unit XP Get Current XP -> return real value
If you set a unit's death time to -1 and use a revive action, it will retain it's exp and levels (even though you don't need it),