| 06-29-2004, 02:43 PM | #1 |
have anyone tried using magic defense as a spell for hero? i change it into a spell for hero with 10 seconds cooldown and consume 100 mana for every cast but strangely it does take 10 seconds to cooldown and doesn't use up 100 mana of the hero. i wonder is it my problem or is it that this ability is bugged? |
| 06-29-2004, 05:06 PM | #2 |
I don't believe that it can be changed to require mana. It's probably just a hardcoded aspect of the spell. Little problems like this exist rampantly throughout the ability editor. |
| 06-30-2004, 05:11 AM | #3 |
Event Unit - A unit begins casting an ability Conditions (Ability being cast) Equals to Magic Defense Actions Unit - Set Mana of (Casting Unit) to ((Mana of (Casting Unit)) - 150) but somehow my codes don't work and i don get it |
| 06-30-2004, 02:41 PM | #4 |
I don't think Defend and Magic Defend are considered "Spells". What you can do is detect for the order to cast magicdefense instead. That's what i do for my Legionaries map. Different event, same effect. |
| 07-01-2004, 04:55 PM | #5 |
sorry i don get it because i am still a noob can you kindly show me some example? because i tried to do and still fail. |
| 07-01-2004, 11:26 PM | #6 |
[code] Event: Unit is issued an order with no target Condition: Order issued = magicdefense Action: Unit - Set Mana of (Ordered Unit) to ((Mana of (Ordered Unit)) - 150) |
| 07-02-2004, 05:32 AM | #7 |
You'd have to check if the unit even has enough mana tho It should look like this Event: Unit is issued an order with no target Condition: Order issued = magicdefense Action: If (Conditions) Then (Actions) Else (Actions) Conditions Mana of (Ordered Unit) greater than or equal to 150 Then Unit - Set Mana of (Ordered Unit) to ((Mana of (Ordered Unit)) - 150) Else Display text for (Owner of (Ordered Unit)): Not enough mana |
