I am trying to create an ability that sets the CASTER's mana to zero, and does an equal amount of damage to the target. Basically, I am trying to create a feedback that is based on the caster's mana and not the target's.
I cannot figure out how to do this in the data editor, but more importantly I tried to do this through triggers and it fails to recognize the unit I target with the ability I created. I've spent all day trying things out and I'm just ready to let an expert tell me what I'm doing wrong.
Here is the trigger I created:
Discharge
Events
Unit - Any Unit uses Mage - Discharge at Generic6 - Complete stage (Ignore shared abilities) * Have tried ANY STAGE as well
Local Variables
Mana Spent = 0.0 <Real>
Conditions
Actions
Variable - Set Mana Spent = ((Triggering unit) Energy (Current))
UI - Display (Text(Mana Spent) with Any Precision decimal places) for (All players) to Subtitle area - Displays mana correctly in game
Unit - Set (Target unit for (Triggering order)) Life to (((Target unit for (Triggering order)) Life (Current)) - Mana Spent)
UI - Display (Name of (Unit type of (Target unit for (Triggering order)))) for (All players) to Subtitle area - Gives an error
Unit - Set (Triggering unit) Energy to 0.0
----
Trying this through the data editor I could not figure out how to switch the amount of life lost from the target's mana to the caster's mana. ALSO: I excluded Ground as an allowable target but when I test it I can still cast on the ground :/
I am trying to create an ability that sets the CASTER's mana to zero, and does an equal amount of damage to the target. Basically, I am trying to create a feedback that is based on the caster's mana and not the target's.
I cannot figure out how to do this in the data editor, but more importantly I tried to do this through triggers and it fails to recognize the unit I target with the ability I created. I've spent all day trying things out and I'm just ready to let an expert tell me what I'm doing wrong.
Here is the trigger I created:
Discharge
Events
Unit - Any Unit uses Mage - Discharge at Generic6 - Complete stage (Ignore shared abilities) * Have tried ANY STAGE as well
Local Variables
Mana Spent = 0.0 <Real>
Conditions
Actions
Variable - Set Mana Spent = ((Triggering unit) Energy (Current))
UI - Display (Text(Mana Spent) with Any Precision decimal places) for (All players) to Subtitle area - Displays mana correctly in game
Unit - Set (Target unit for (Triggering order)) Life to (((Target unit for (Triggering order)) Life (Current)) - Mana Spent)
UI - Display (Name of (Unit type of (Target unit for (Triggering order)))) for (All players) to Subtitle area - Gives an error
Unit - Set (Triggering unit) Energy to 0.0
----Trying this through the data editor I could not figure out how to switch the amount of life lost from the target's mana to the caster's mana. ALSO: I excluded Ground as an allowable target but when I test it I can still cast on the ground :/
The ability is of type: Effect - Target
I actually have a similar problem, with a similar ability. However I didn't use Target Order for unit, I used acquired target (it still didn't work).
Does your abilities has a target or just instant effect ? If you have to target before the trigger run, you should use this instead
Unit - Set (Triggering ability target unit) Life to (((Target unit for (Triggering order)) Life (Current)) - Mana Spent)
Your event is unit used abilities, not issued order so i guess order does not work
This worked, thank you :)
(had to change it for 2nd half of trigger as well though)