Hi there folks, I'm attempting to make a custom hero class that uses his manna similar to Rage, where he has a set max manna of 100 which it cannot exceed no matter what (buff's, level up and increased int will not effect manna maximum). I want his intelligence to continue to increase because I want his mana regen to increase when he levels up.
I'm quite new to the editor let alone triggering but I had assumed that making a standard if-else like script would work (if hero mana > 100 then hero mana = 100), but I was mistaken.
I tried set it up with the event "Unit-Mana". With this event I have to choose a unit that is on the map then I can do the greater than 100. And that's the end of the event and I move on to the action which is "set unit mana" to 100.
This works perfectly, but only with the unit that I selected on the map when editing. If I were to make a new hero of the same type then the trigger doesn't work, and I can't delete the unit I selected when making the trigger either.
Basically my question is can I get this trigger to happen each time my custom hero is created? If not is there a way I can make his max mana stay at 100 without effecting any other stat? Thank you so much for any replies!
I'm quite new to the editor let alone triggering but I had assumed that making a standard if-else like script would work (if hero mana > 100 then hero mana = 100), but I was mistaken.
I tried set it up with the event "Unit-Mana". With this event I have to choose a unit that is on the map then I can do the greater than 100. And that's the end of the event and I move on to the action which is "set unit mana" to 100.
This works perfectly, but only with the unit that I selected on the map when editing. If I were to make a new hero of the same type then the trigger doesn't work, and I can't delete the unit I selected when making the trigger either.
Basically my question is can I get this trigger to happen each time my custom hero is created? If not is there a way I can make his max mana stay at 100 without effecting any other stat? Thank you so much for any replies!