| 07-14-2004, 10:08 AM | #1 |
I tried making a basic spell trigger to enhance my spell that checks the level but it doesn't work. It's probably something stupid.. Thanx for help anyone. Code:
Slash of Death
Events
Unit - A unit Starts the effect of an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Slash of Death
(Level of Slash of Death for (Casting unit)) Equal to 1
Then - Actions
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 75.00)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Slash of Death
(Level of Slash of Death for (Casting unit)) Equal to 2
Then - Actions
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 225.00)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Slash of Death
(Level of Slash of Death for (Casting unit)) Equal to 3
Then - Actions
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 375.00)
Else - Actions |
| 07-14-2004, 11:55 AM | #2 |
Why do you check the spell being cast every time? Just put it as the triggers main condition. The rest doesnt look like it should mess up. Youre going to have the problem where the casting unit wont get credit for killing the unit if it dies from its life getting reduced in this trigger, so I recommend doing something different. Try using Triggering Unit instead of Casting Unit though, sometimes WE is screwy like that. |
| 07-14-2004, 03:29 PM | #3 |
Some spells do not trigger the "starts effect of ability" event and therefore this trigger may never fire. I know for sure that stormbolt does not trigger that effect. |
| 07-14-2004, 04:06 PM | #4 |
Th15, perhaps this was true in older versions, but I just did a thest map and storm bolt activated a "starts the effect of an ability" just fine. Also, I don't see why casting unit wouldn't work, but triggering would. I haven't encountered such a problem yet. I'm not sure what else could be the problem, perhaps you should try a shorter trigger first, since you have a linear increase in damage, this will be a piece of cake: Code:
Slash of Death
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Slash of Death
Actions
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (75.00 - (150 * (Level of Slash of Death for (Casting unit)))))But as has been said, this won't give the slashing unit any experience, should it kill the target unit with this ability, and also, it only deals with the lenght of the trigger, which of course is not proven to have any connection with the fact that the trigger doesn't work. However, it may work, it should work, so give it a try. In any case, also try basing the hero's ability on something else, perhaps the ability you're using actually doesn't trigger the "starts the effect of an ability" event as th15 suggested. |
