I have a trigger setup so when a neutral unit is attacked change owner to hostile.
When this change happens, for some reason the changed unit loses all energy and heals up to full, negating the initial attack damage.
I ran the trigger debugger thinking maybe a trigger was firing causing this, but that's not the case.
I created a new blank map to test this and it worked fine there, so it's something on my map.
I also tried making it so after the unit changes owner, deal the attackers weapon damage on the unit, but this causes it to deal double damage. So your unit attacks, the enemy unit heals, then it deals the damage from the effect, then your unit hits again. This really shouldn't be double damage and technically should work, but it doesn't. I know this because the lv 1 unit has 5 life and you deal 1 damage and on the first attack it kills the enemy unit... The trigger isn't firing more than 1 time.
I don't know if this is a trigger issue or data. I have tried everything I can think of and am bashing my head into a wall at this point.
I would use a damage response on the defender using a buff that applies a Modify Unit effect that changes ownership to hostile and heals (like transfusion).
Contribute to the wiki (Wiki button at top of page)
Considered easy altering of the unit textures?
For my public assets look here!
Quote from DrSuperEvil: GoI would use a damage response on the defender using a buff that applies a Modify Unit effect that changes ownership to hostile and heals (like transfusion).
I can't get this to work. The impact is source right? Also what player # is hostile in this setup?
Caster should also work. Heard they fixed the bug with the player transfer of the modify unit effect. Else you will need a neural parasite like buff to make it go hostile.
I couldn't get that working, but this trigger below seems to do the trick. I still don't understand why they are being healed and losing energy upon change.
Neutral Unit Attacked
Unit - Any Unit takes Non-Fatal Any damage (from Any effects)
(Owner of (Triggering unit)) == 0
Unit - Change ownership of (Triggering unit) to player 14 and Retain Color
Environment - Deal damage using Dummy on (Triggering unit) from (Damaging unit) with (Triggering damage amount) extra damage
Unit - Set (Triggering unit) Energy (Percent) to 100.0
Unit - Order (Triggering unit) to ( Attack targeting (Damaging unit)) (Replace Existing Orders)
Maybe the 100% energy is the base value and you have someting added?
no that's not it. I removed that part to test and it still did the same as before.
You must login to post a comment. Don't have an account? Register to get one!