[Solved] Please help me fix this spell

Status
Not open for further replies.
Level 22
Joined
May 29, 2013
Messages
1,573
I really wanted to use [GUI] Corruption, but it doesn't work properly and Chaosy unfortunately has no intention to update it.

The spell is supposed to drain some life from nearby enemy units and heal the caster, but no healing occurs (although the healing visuals appear).

I hope this is not too difficult to fix while keeping it GUI and compatible with older patches.
 
As long it doesn't use the newest natives introduced then compatibility shouldn't be a problem.
I've just previewed the code and didn't test it in-game.
Probably, the missile system he used has convoluted operations,
So the faulty on 'healing' should be looked on the system code.

There's a condition there that just heals the caster if the picked units were not an enemy.
In that case, this condition would always return true because
the source is the picked enemy unit in the range of spell cast.
I also suggest put a useful debug messages here to know if these parts don't execute properly.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (MS_Source2[MS_Integer[3]] belongs to an enemy of (Owner of MS_Target2[MS_Integer[3]]).) Equal to True
  • Then - Actions
  • Unit - Cause MS_Source2[MS_Integer[3]] to damage MS_Target2[MS_Integer[3]], dealing MS_Damage2[MS_Integer[3]] damage of attack type MS_AttackType2[MS_Integer[3]] and damage type MS_DamageType2[MS_Integer[3]]
  • Else - Actions
  • Unit - Set life of MS_Target2[MS_Integer[3]] to ((Life of MS_Target2[MS_Integer[3]]) + (MS_Heal2[MS_Integer[3]] x 1.00))
I bet you can find that unique condition inside the 'MissileSystemCore'

You can easily fix it by merging the damage and heal in this part.
 
There's a condition there that just heals the caster if the picked units were not an enemy.
In that case, this condition would always return true because
the source is the picked enemy unit in the range of spell cast.
So, what should I do with that condition? Do I need to change or remove something?
I bet you can find that unique condition inside the 'MissileSystemCore'
I can find it, but I have no idea what I'm looking at. Triggers have always been the bane of my existence.
You can easily fix it by merging the damage and heal in this part.
How should I go about doing that?
 
Status
Not open for further replies.
Back
Top