Hello again! I posted on here a couple days ago because I needed help with a drain life spell and you guys were extremely helpful. Yet again, I'm having trouble with a spell and I've tried fixing it multiple ways, so I thought I'd seek your expertise again.
Basically what I have is a spell based on "Orb of Slow". Once the hero learns it, their auto attack will be passively modified to do a special strike every few seconds (the orb of slow has a cooldown based on level).
Here is what is built into the spell, without any triggers. The hero attacks the target, dealing extra damage and putting a debuff on them that silences and slows for 3 seconds. At the end of the slow, they take additional damage if the debuff is still on them.
Now on to what the trigger for the spell does. The trigger for the spell is primarily to add flare and make it seem unique. Originally, the spell did not have a visual special effect when the buff wore off, so the second damage proc from the spell was unnoticeable. I created the trigger originally just to add in this effect when the buff wore off. Since I've been making my spells scale with Hero stats lately, the trigger part of the spell also adds additional damage based on the hero's Strength and Intelligence now.
The original trigger was much simpler, but this is what I ended up with after hours of unsuccessfully trying to fix it:
Now the trigger has always worked, and provided the effects that I want. However, after about 5 minutes of game play with this spell in use, the game becomes unplayable from the amount of lag. It's worth noting that when I was using a simpler version of the trigger, the spell lagged much less... it would become unplayable after 10 minutes or so. Either way is still a problem though, as you can imagine.
Suggestions for fixing it or ideas about what is causing the lag? Thanks!
Basically what I have is a spell based on "Orb of Slow". Once the hero learns it, their auto attack will be passively modified to do a special strike every few seconds (the orb of slow has a cooldown based on level).
Here is what is built into the spell, without any triggers. The hero attacks the target, dealing extra damage and putting a debuff on them that silences and slows for 3 seconds. At the end of the slow, they take additional damage if the debuff is still on them.
Now on to what the trigger for the spell does. The trigger for the spell is primarily to add flare and make it seem unique. Originally, the spell did not have a visual special effect when the buff wore off, so the second damage proc from the spell was unnoticeable. I created the trigger originally just to add in this effect when the buff wore off. Since I've been making my spells scale with Hero stats lately, the trigger part of the spell also adds additional damage based on the hero's Strength and Intelligence now.
The original trigger was much simpler, but this is what I ended up with after hours of unsuccessfully trying to fix it:
-
Nether Strike
-
Events
- Unit - A unit Is attacked
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- (Unit-type of (Attacking unit)) Equal to Nether Warrior
- ((Attacked unit) has buff Nether Strike ) Equal to False
-
Conditions
-
And - All (Conditions) are true
-
Actions
- Wait until (((Attacked unit) has buff Nether Strike ) Equal to True), checking every 0.10 seconds
- Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (((Real((Strength of (Attacking unit) (Include bonuses)))) x 0.50) + ((Real((Intelligence of (Attacking unit) (Include bonuses)))) x 0.75)) damage of attack type Spells and damage type Normal
- Wait 2.50 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Attacked unit) has buff Nether Strike ) Equal to True
-
Then - Actions
- Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (((Real((Strength of (Attacking unit) (Include bonuses)))) x 0.50) + ((Real((Intelligence of (Attacking unit) (Include bonuses)))) x 0.75)) damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the overhead of (Attacked unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Real((Level of Nether Strike for (Attacking unit)))) Equal to 1.00
-
Then - Actions
- Trigger - Turn off (This trigger)
- Wait 6.90 seconds
- Trigger - Turn on (This trigger)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Real((Level of Nether Strike for (Attacking unit)))) Equal to 2.00
-
Then - Actions
- Trigger - Turn off (This trigger)
- Wait 4.90 seconds
- Trigger - Turn on (This trigger)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Real((Level of Nether Strike for (Attacking unit)))) Equal to 3.00
-
Then - Actions
- Trigger - Turn off (This trigger)
- Wait 2.90 seconds
- Trigger - Turn on (This trigger)
- Else - Actions
-
If - Conditions
-
Events
Suggestions for fixing it or ideas about what is causing the lag? Thanks!