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!
In a trigger I need a function to be able to return (in integer or real) the mana cost value of a spell. The spell being refered can be any spell (spell cast by casting unit). What do i do?
The first post answered my question, i was planning on doing it that way, I just wanted to know if there was a function for Integer values to find the exact cost of a spell without going through all of that; also making a dummy unit will force me to retool how the mechanic works for this particular spell
Warlord's first post is (one of) the best ways to do that. Ideally, you would use a gamecache with all of the mana costs stored in it, but for GUI, the above suffices. There's no magic JASS function to get mana cost
Another way to do it, though, would be to set one of the ability's fields that it doesn't use (eg: Art - Area of Effect) to its value (eg "100") (must be an art field), then retrieve that value with GetAbilityEffect and I2S. However, this isn't a GUI thing, so if you don't want to muddle with JASS then Warlord's way is ideal.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.