| 01-16-2004, 10:00 PM | #1 |
Im using a stormbolt-based ability called gold toss where the caster sacrifices gold to deal damage on an enemy. It also comes with a simple trigger for updating the level of the integer variable gold toss. Any ideas why this removes gold but does not damage target? Gold Toss Events Unit - A unit Finishes casting an ability Conditions (Ability being cast) Equal to Gold Toss Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Gold_Toss Equal to 1 ((Owner of (Triggering unit)) Current gold) Greater than or equal to 200 Then - Actions Player - Add -200 to (Owner of (Triggering unit)) Current gold Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 300.00) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Gold_Toss Equal to 2 ((Owner of (Triggering unit)) Current gold) Greater than or equal to 300 Then - Actions Player - Add -300 to (Owner of (Triggering unit)) Current gold Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 450.00) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Owner of (Triggering unit)) Current gold) Greater than or equal to 400 Gold_Toss Equal to 3 Then - Actions Player - Add -400 to (Owner of (Triggering unit)) Current gold Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 600.00) Else - Actions |
| 01-16-2004, 11:39 PM | #2 |
not sure if its right but i think its very simple, you have it set to target unit of ability BEING CAST, and the event is finishes the spell, so there is no spell being cast. just change it to A Unit begins Casting an Ability, and balance it out if the casting time was important. heh, ive made this mistake before myself. |
| 01-17-2004, 03:52 AM | #3 |
Yes i have encountered this problem a lot of times, when a unit finishes casting an ability, only the triggering unit remains while the target unit or target point of ability being cast becomes reset. |
| 01-17-2004, 02:11 PM | #4 |
thanks, but it isn't possible to make a unit dieing via trigger give bounty is it? Not so much bounty as just being able to detect what players unit started the ability, as it would really only matter for heros. Would there be any way to compare before the life subtract and after to see if the spell had killed the unit? |
