Well I'm not sure if it should be here but I'm having troubles with a certain spell.
I want it to do damage according to how much mana you have left. I've tried a lot of different things, but can anyone point me in the right direction as to what I should be looking for?
This is EXTREMELY simple. All that is needed is the simplest of triggers. The trigger should be run when the projeticle hits a unit or when the units casts the spell.
They return the current and max mana a unit has. Use them in your formulars to culculate the damage you want the spell to do based on mana. Then use the native UnitDamageTarget() to damage the target by the culculated damage amount.
GetUnitState(whichUnit,UNIT_STATE_MANA) This will return the unit's current mana
GetUnitState(whichUnit,UNIT_STATE_MAX_MANA) This will return the unit's max mana
constant native GetUnitState takes unit whichUnit,unitstate whichUnitState returns real
Ok I don't understand what you're trying to tell me here... I can't find anything like UNIT_STATE_MAX_MANA or anything remotly close to it. If you could maybe make the trigger and take a screenshot of it... that might help. That is if you want to.
Also by the looks of it, I don't think this is going to do what I want. See I want it so that when you cast a spell it takes your ammount of mana and converts that into a percentage... then uses that percentage to set the amount of damage you do.
Examples 1000 Mana does 100% damage. 90000 Mana does 9000% damage. 100 Mana does 10% damage.
If the trigger you gave me does that, then don't worry about changing it, just thought I would mention it.