| 12-22-2003, 12:53 PM | #1 |
I'm thinking of a hero ability. I want the player to be able to cast it on an enemy unit taking away either all or a portion of their mana and then the player must click again on another enemy unit to transfer the mana. A skilled player would transfer a spellcaster's mana to a hero who already almost has full mana. Not sure how I might do this. |
| 12-22-2003, 01:07 PM | #2 |
original spell: Banish variables Transfer/integer/1/ Mana/Real/0 Caster/unit Target/unit trigger01 E: A unit is target an object C: Ordered Unit is equal to (ur casting unit) A: Set Target = Target unit of issued order trigger02 E: A unit start casting an ability C: Casting unit is equal to (ur casting unit) Ability being cast is equal to (ur spell) A: Set Caster = Casting unit Set Mana = mana of Target if Transfer is equal to 1 then do set mana of Target to mana of Target - Mana, else Do Nothing if Transfer is equal to 2 then do set mana of Target to mana of Target + Mana, else Do Nothing If Transfer is equal to 1 then do set Transfer = Transfer +1, else Do Nothing if transfer is equal to 2 then do set Transfer = 1, Else Do Nothing that should do it :D |
| 12-23-2003, 11:54 AM | #3 |
Very cool. Thanks, I'll try it out. |
| 12-23-2003, 12:59 PM | #4 |
that will transfer when u cast the spell a second time! what u could do is pause the caster and then use the selection event to get the second target. the player woudl be stuck until he picked one. this would be bad if there weren't any targets around tho. but if u don't pause him, he could just not pick a transfer target... u could maybe make it so if the player doesn't transfer the mana w/in 10 seconds, then he takes some damage. do u know how to use the selection event thing? |
