i'm attempting to set the cost of a ward spell to be a percentage of max magicka per second, instead of a flat rate.
this way, i can make the ward quite powerful, without having to worry about it becoming overpowered lategame, or barely useable early game.
the idea would be to use an inactive variable such as "favorsperday" and set it to the player's maximum mana.
then i could mod the cost of the spell by value = http://forums.bethsoft.com/topic/1504277-playergetav-max-actor-value/1 +"favorsperday" x .01.
this would give the spell a percentage cost that would scale perfectly with max mana.
however, the variable would have to be updated periodically to account for increases to mana.
the problem comes when the variable is updated while the mana bar isn't full and gets set to the low current mana value, which then drastically drops the cost of the ward, and allows it to be casted much cheaper.
is there a way to get the max value of an actorvalue instead of just the current value?