Hello. I've been coming to these forums and this website ever since I began using the World Editor. Thanks to some of the brilliant members and extensive searching, you wonderful people have answered countless questions before I've even had to ask.
However, I believe I've hit my first "I'm stumped, can't figure it out, don't see anything that could fix it" moment.
I've tried learning JASS and it's very hard, I have mild comprehension problems. I've been using the basic GUI and Triggers to create spells and abilities, and it's worked so far. The ability that is breaking the mold however, is a Damage Over Time + Self Heal for damage done.
Basically, I -want- the Spell to strike one enemy, stun him, deal periodic damage equal to twice the caster's Intellect every .99 seconds, and heal the caster for the same amount. After a lot of failed toying around with the Shadow Strike spell, I decided to try and make the damage applied in intervals. This is what I have so far.
Notes:
-I've based the spell on Storm Bolt, removed damage, made it into a single-rank ability, and left it at a 3 second stun.
-Everything works except the damage done to the Target. It recovers life for the casting unit at .99 second intervals doing 2xCasting Hero's INT stat. It -doesn't- damage the target.
-It is intended to be a level 6 ultimate ability. Could it be a problem with the Damage Type - Normal function?
-This ability has been tested on Heroes and Non-hero units, none of which were magic immune.
-I read that (Target unit of Ability being cast) doesn't persist through Wait commands, so I set both the casting unit and the cast-upon unit to their own variables.
Also: Will eventually try and figure out how to add Floating Combat Text that reads correct values. Is that possible?
Thank you for any assistance that is able to be offered.
However, I believe I've hit my first "I'm stumped, can't figure it out, don't see anything that could fix it" moment.
I've tried learning JASS and it's very hard, I have mild comprehension problems. I've been using the basic GUI and Triggers to create spells and abilities, and it's worked so far. The ability that is breaking the mold however, is a Damage Over Time + Self Heal for damage done.
Basically, I -want- the Spell to strike one enemy, stun him, deal periodic damage equal to twice the caster's Intellect every .99 seconds, and heal the caster for the same amount. After a lot of failed toying around with the Shadow Strike spell, I decided to try and make the damage applied in intervals. This is what I have so far.
Code:
Hatred Feeds on Terror
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to He Feeds On Your Terror
Actions
Set TerrorCaster = (Casting unit)
Set TerrorTarget = (Target unit of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Target unit of ability being cast) is A structure) Equal to False) and (((Target unit of ability being cast) is Mechanical) Equal to False)
Then - Actions
Unit - Set life of TerrorCaster to ((Life of TerrorCaster) + (Real(((Intelligence of TerrorCaster (Include bonuses)) x 2))))
Unit - Cause TerrorCaster to damage TerrorTarget, dealing (Real(((Intelligence of TerrorCaster (Include bonuses)) x 2))) damage of attack type Spells and damage type Normal
Wait 0.99 seconds
Unit - Cause TerrorCaster to damage TerrorTarget, dealing (Real(((Intelligence of TerrorCaster (Include bonuses)) x 2))) damage of attack type Spells and damage type Normal
Unit - Set life of TerrorCaster to ((Life of TerrorCaster) + (Real(((Intelligence of TerrorCaster (Include bonuses)) x 2))))
Wait 0.99 seconds
Unit - Cause TerrorCaster to damage TerrorTarget, dealing (Real(((Intelligence of TerrorCaster (Include bonuses)) x 2))) damage of attack type Spells and damage type Normal
Unit - Set life of TerrorCaster to ((Life of TerrorCaster) + (Real(((Intelligence of TerrorCaster (Include bonuses)) x 2))))
Else - Actions
Do nothing
-I've based the spell on Storm Bolt, removed damage, made it into a single-rank ability, and left it at a 3 second stun.
-Everything works except the damage done to the Target. It recovers life for the casting unit at .99 second intervals doing 2xCasting Hero's INT stat. It -doesn't- damage the target.
-It is intended to be a level 6 ultimate ability. Could it be a problem with the Damage Type - Normal function?
-This ability has been tested on Heroes and Non-hero units, none of which were magic immune.
-I read that (Target unit of Ability being cast) doesn't persist through Wait commands, so I set both the casting unit and the cast-upon unit to their own variables.
Also: Will eventually try and figure out how to add Floating Combat Text that reads correct values. Is that possible?
Thank you for any assistance that is able to be offered.