HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Mana burn usin %

08-27-2007, 03:12 PM#1
Dooblivion
I want to do a mana burn that effects the units mana
in percentage. I mean like decreasing the units maximum mana by X% for some time... but i can't seem to make it work
i put this trigger for it

Unit cast spell, spell = to mana burn, set targeted unit mana to X%...

This should of been the right trigger...does triggers work for hero spells?

Oh ohh another question! ... How do you make this increase %
after each lvl learned
ex:
lvl1- 70%
lvl2- 50%
lvl3- 30%


If you need anymore clarification well...ask
08-27-2007, 03:20 PM#2
moyack
You have to make that mana burn ability with mana burn amount = 0.01, and trigger the effect.

If you want this damage over time, then I have to ask, the caster will be channeling the effect or it's instant cast and the effect is over time??
08-27-2007, 03:22 PM#3
CommanderZ
Of course they work. You must completely trigger the spell, such spells are usually based on channel. You must then make a trigger with "Unit strats effect of an ability" and ability comparsion as condition. In the trigger body then simply put Set hero property() and calculate the percentage here (use some divisions). Or maybe there already is oercentage, I don't remember.
08-27-2007, 03:32 PM#4
Dooblivion
The caster will only strike the target once and decrease his mana in one second. This will last for about 30 seconds before the units mana recovers and goes back to 100%

-There isnt a percentage to put on mana burn, mana siphon has it but i dont want to trade manas points between units...
08-27-2007, 06:36 PM#5
Castlemaster
I'm having trouble understanding what you want precisely.
EDIT: I realized what you want, skip to bottom part

It seems from your first post that you want an ability that "burns X% of the unit's max mana" instead of "burns X mana of target unit". Mana burn cannot be altered to do % mana burn instead of a static number.

It also seems that you have almost no triggering knowledge. When we say "completely trigger the spell", we mean that the ability itself does nothing, and all the effects are done through triggers.

Trigger:
Burn percent Mana
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Mana Burn
Collapse Actions
Set ManaBurn = ((Real((Level of Mana Burn for (Triggering unit)))) x (0.10 x (Max mana of (Target unit of ability being cast))))
Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) - ManaBurn)
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ManaBurn damage of attack type Spells and damage type Normal
Custom script: Add in the floating text if you desire

The variable "ManaBurn" specifies how you want to scale the % of the burn. In this case it burns 10/20/30% of max mana.

For the actual mana burn ability that the hero clicks on, create a "dummy spell" that does nothing. Edit the trigger above so that it fires when "(Ability being cast) equal to Mana Burn Dummy Spell". In reality this spell just triggers this effect.

If you are not familiar with triggers, there are plenty of tutorials on the site to get you started.

To answer your second question, I'm guessing you are asking how to do the math for that scaling.
[(90)-(Level of ability*20)]%

EDIT: You are looking for an ability that lowers the units max mana for an amount of time. Like if the unit's max mana is 100, you want to set it to 90. As far as I know, the only way to do that would be to use the item ability increase max mana, and change the field value to a negative number (shift+double click). If you want to lower it by a %, you would have to make a system that uses increments of the buff. This would be quite difficult and ambitious, or you can find a system in our resources that does the same thing.
08-30-2007, 10:45 PM#6
Dooblivion
i did try to trigger the spell but after searching with search- on editor and trying to find some trigger related to a unit but i didn't find any.
Anyway your explinations were great :)
I just have something that doesnt quite work and im trying to fix it.
Thanks
08-30-2007, 11:09 PM#7
Castlemaster
It would really help us help you if you elaborated on what you want the spell to do. Does it lower max mana, or just burn it? Because I could trigger both of those easily, and really help you get what you want.