• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Please help me fix this spell

Status
Not open for further replies.
Level 21
Joined
May 29, 2013
Messages
1,566
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.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
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.
 
Level 21
Joined
May 29, 2013
Messages
1,566
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.
Top