HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding Maximun Mana?

07-16-2006, 01:53 PM#1
Sharingan
How would I be able to change the maximun mana of a unit without using INT?
I know there is that ability "Item Mana Bonus", but that one is plain bugged...
If I give a Unit the same "Item Mana Bonus" twice in the editor, it works, thus giving the unit the double Mana Bonus.
But once I try to do that in game, like with
"UnitAddAbility(unit,integer)", it would only work once...thus, there is only one Mana Bonus...
07-16-2006, 01:57 PM#2
Rising_Dusk
Here is a link to Blade.dk's SetUnitMaxState system.

Using this will allow you to set a unit's maximum mana/life with a single line of code in a function.
07-16-2006, 02:14 PM#3
Sharingan
Collapse JASS:
elseif u == UNIT_STATE_MAX_MANA then
        return 'A001' // Rawcode of the Max Mana Modifier ability.
Which ability is meant here?
07-16-2006, 02:21 PM#4
Rising_Dusk
You have to create an ability for your map based on the "Item Mana Bonus (100)" ability.
You might consider following the instructions in the test map located at this thread.

Also, unless you want to modify the structure of the function you may as well make the max life modifier one too.
Follow the instructions Blade has in his testmap linked above.
07-16-2006, 02:27 PM#5
Sharingan
-_-...
He should at least mention that how one has to set up the ability levels and its data.
07-16-2006, 02:45 PM#6
Rising_Dusk
Sorry I didn't mention that in my former post, I thought there was some kind of a "How to setup" in the testmap.

Each of the abilities needs 7 levels done JUST like he has them in his dummy map.
Also, you'll need to put your custom mana/life modifier abilities' Raw Codes into the configuration function for it to work.
07-16-2006, 05:03 PM#7
Blade.dk
Quote:
Originally Posted by Read Me
All the code you need can be found in the Custom Script Section (the thing at the top of the trigger
list with the map's name on) of this map. Simply copy it to the map you want to implement the system to.

Also copy the two abilities, and find the places where it asks for rawcodes in the code you just copied.
Replace the rawcodes there with the rawcodes of the two abilities in your map.

Come on, you can't be that stupid.