I can't figure out how to make this spell without using a trigger event "Event - Unit Takes Damage".
I tried having a damage response buff, but I don't see how you can subtract mana equal to the damage. I also tried having a trigger that runs when the damage response effect executes, but I don't see how the trigger can access the amount that damaged the unit.
Suggestions?
I am looking for a possible data solution
I don't want to use that trigger, is what I'm saying. It's very inefficient to use "Any unit takes damage" in an event. That's why I consider this a data problem. I'd like a data solution.
with the mana shield in data, could you not use the protoss shield, and have it burn off the energy as it goes down? If thats what you are planning on doing.
A bit more clarification on how you want the ability to work would be good :)
I'd like for the spell to be a toggle-able buff. While the buff is toggled, any damage the unit receives is absorbed by the unit's energy, instead of their health or shields. The amount absorbed by the energy is subtracted from the energy.
So it essentially works the same as shields or health.
What I cannot figure out how to do is correctly subtract the amount of energy from the unit equal to the damage done.
Things I tried:
Using the Combat - Damage Response field in the buff to set it to negate 100% of the damage while unit has energy. However, this does not work because I cannot find a way to subtract the negated damage from the unit's energy.
I tried again using the Combat - Damage Response field but give it a dummy effect that fires upon taking damage. This effect is linked to a trigger with the event "Dummy Effect Used". However, I can't figure out how to use this method and get access to the damage done.
So far, I've only been able to make it work with the trigger event "Event - Any Unit Takes Damage", and I don't want to use this, because there are 100's of units on the map at any one time.
This has been looked into before, not extensively though
I have done a bit of searching in the data editor, and can see no way of getting the damaging value in data, I can't find any validator to do it either.
use an ability 'behaviour" , that will make it toggle-able .
okay after that, use a buff, go to the damage responce field and set it to 1 (100%). make it modify the amount of damage to 0 . Okay after that, go create a modify unit effect, That will be the amount of energy you want to drain on yourself for each hit. Now go back to that buff to the same damage response field and go to the field called "handled" , you can put an effect in there . Make sure the modify unit effect is targeted to affect "source" .
Okay after that, for each attack, the modify unit effect will subtract mana. Now go back to the buff fields and and find the Validator -Remove field.
you want to put in there 2 validators, there are already pre-made. Put in "can spend energy" and "has energy".
Does that work 1 for 1 though, so if a marauder is shooting doing 10 damage and a marine is shooting for 5 damage, it will do just that, take 10 damage of and 5 damage of each time they fire.
I don't believe he wants a set amount, which is where the trigger version does this easiest cause it uses variables
Yeah, sorry I mean not possible without the "Unit takes damage" triggers. I wan't to have wide use Mana Shield an am worried of the performance impact of using that event.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I can't figure out how to make this spell without using a trigger event "Event - Unit Takes Damage".
I tried having a damage response buff, but I don't see how you can subtract mana equal to the damage. I also tried having a trigger that runs when the damage response effect executes, but I don't see how the trigger can access the amount that damaged the unit.
Suggestions?
I am looking for a possible data solution
Moved to triggers.
If your looking for damage amount I believe you need to create a variable type (real)
Untitled Variable 001 = (Triggering damage amount) <Real>
@nevjmac: Go
I don't want to use that trigger, is what I'm saying. It's very inefficient to use "Any unit takes damage" in an event. That's why I consider this a data problem. I'd like a data solution.
lol >.< you asked for a solution in triggers?
You may need to clarify you are searching for a solution in data, moving back rofl
@nevjmac: Go
Sorry.
I'll take any solution that doesn't involve using the event "Event - Any unit takes damage".
Preferably, data.
with the mana shield in data, could you not use the protoss shield, and have it burn off the energy as it goes down? If thats what you are planning on doing.
A bit more clarification on how you want the ability to work would be good :)
@nevjmac: Go
All right.
I'd like for the spell to be a toggle-able buff. While the buff is toggled, any damage the unit receives is absorbed by the unit's energy, instead of their health or shields. The amount absorbed by the energy is subtracted from the energy.
So it essentially works the same as shields or health.
What I cannot figure out how to do is correctly subtract the amount of energy from the unit equal to the damage done.
Things I tried: Using the Combat - Damage Response field in the buff to set it to negate 100% of the damage while unit has energy. However, this does not work because I cannot find a way to subtract the negated damage from the unit's energy.
I tried again using the Combat - Damage Response field but give it a dummy effect that fires upon taking damage. This effect is linked to a trigger with the event "Dummy Effect Used". However, I can't figure out how to use this method and get access to the damage done.
So far, I've only been able to make it work with the trigger event "Event - Any Unit Takes Damage", and I don't want to use this, because there are 100's of units on the map at any one time.
http://www.sc2mapster.com/forums/development/data/19125-energy-shield-lose-energy-instead-of-hp-when-damaged/
This has been looked into before, not extensively though
I have done a bit of searching in the data editor, and can see no way of getting the damaging value in data, I can't find any validator to do it either.
maybe someone else might have a solution
well u lucky im pro with the data editor lol ;p
use an ability 'behaviour" , that will make it toggle-able .
okay after that, use a buff, go to the damage responce field and set it to 1 (100%). make it modify the amount of damage to 0 . Okay after that, go create a modify unit effect, That will be the amount of energy you want to drain on yourself for each hit. Now go back to that buff to the same damage response field and go to the field called "handled" , you can put an effect in there . Make sure the modify unit effect is targeted to affect "source" .
Okay after that, for each attack, the modify unit effect will subtract mana. Now go back to the buff fields and and find the Validator -Remove field.
you want to put in there 2 validators, there are already pre-made. Put in "can spend energy" and "has energy".
that should be it.
@Jinxxx123:
Does that work 1 for 1 though, so if a marauder is shooting doing 10 damage and a marine is shooting for 5 damage, it will do just that, take 10 damage of and 5 damage of each time they fire.
I don't believe he wants a set amount, which is where the trigger version does this easiest cause it uses variables
So 1:1 mana shield still isn't possible?
what if.
- ability - instant
- Apply behaviour effect that applys a behaviour ( duration / if u wana add otehr stuff )
- •Live prevents effect ( stops player from going below 1 hp ) maybe change ti to the units max HP ( this might stop him from taking damage)
then have a trigger Scan to see if a unit has that ability active and if so , if any units with that ability takes damg it ruduces the energy insted??
and the abouve effect would simply stop the damg from happening . not sure if this would work .
Yeah, sorry I mean not possible without the "Unit takes damage" triggers. I wan't to have wide use Mana Shield an am worried of the performance impact of using that event.