- Joined
- May 24, 2008
- Messages
- 21
Greetings,
Most of my custom spells are simple and start/finish using a single trigger. I am trying to accomplish a looping spell using two triggers. The first trigger sets the target when the actual spell is cast, the second trigger applies custom damage and repeats itself if conditions are met.
Here is a stripped down version of the repeating trigger. It runs fine as long as nobody else casts anything. Any ideas on how to better accomplish this functionality?
Most of my custom spells are simple and start/finish using a single trigger. I am trying to accomplish a looping spell using two triggers. The first trigger sets the target when the actual spell is cast, the second trigger applies custom damage and repeats itself if conditions are met.
Here is a stripped down version of the repeating trigger. It runs fine as long as nobody else casts anything. Any ideas on how to better accomplish this functionality?
- Unit - Cause (Casting unit) to damage hero_spelltarget[(Player number of (Owner of (Casting unit)))], dealing hero_spelldamage[(Player number of (Owner of (Casting unit)))] damage of attack type Spells and damage type Unknown
- Wait 0.10 seconds
- Set hero_spelltarget[(Player number of (Owner of (Casting unit)))] = (Random unit from hero_spellunitgroup[(Player number of (Owner of (Casting unit)))])
- Trigger - Run (This trigger) (ignoring conditions)