- Joined
- Jun 10, 2007
- Messages
- 557
I'm making a spellpack purely for practice purposes (I know some of the spells have been done before, and probably better), and I've come to one issue that I really can't figure out. Basically you cast the spell on a unit and a visual dummy is created that slowly moves to the target unit's location, creating dummy units who cast damaging spells on nearby enemy units every 0.75 seconds. Whether it's balanced or not doesn't matter, but the spell isn't working properly at all.
When I cast it, the visual dummy (sphere) moves to the target point, then dummies are being created at the target point (but only after the sphere dies) and they cast their spell, but either they are A: being recreated over and over again or B: not dying when they are supposed to. I really can't figure this out... help?
I have two triggers for the spell.
When I cast it, the visual dummy (sphere) moves to the target point, then dummies are being created at the target point (but only after the sphere dies) and they cast their spell, but either they are A: being recreated over and over again or B: not dying when they are supposed to. I really can't figure this out... help?
I have two triggers for the spell.
-
Sphere of Thunder
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Sphere of Thunder
-
Actions
- Custom script: local location udg_TempLoc
- Set TempLoc = ((Position of (Triggering unit)) offset by 200.00 towards (Facing of (Triggering unit)) degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Sphere of Thunder for (Triggering unit)) Equal to 1
-
Then - Actions
- Unit - Create 1 SphereofThunder1 for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Sphere of Thunder for (Triggering unit)) Equal to 2
-
Then - Actions
- Unit - Create 1 SphereofThunder2 for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Sphere of Thunder for (Triggering unit)) Equal to 3
-
Then - Actions
- Unit - Create 1 SphereofThunder3 for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set TempLoc = ((Position of (Triggering unit)) offset by 800.00 towards (Facing of (Triggering unit)) degrees)
- Unit - Order (Last created unit) to Move To TempLoc
- Custom script: call RemoveLocation (udg_TempLoc)
-
Events
-
Sphere of Thunder Bolts
-
Events
- Time - Every 0.75 seconds of game time
- Conditions
-
Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Unit-type of (Matching unit)) Equal to SphereofThunder1) or ((Unit-type of (Matching unit)) Equal to SphereofThunder2)) or ((Unit-type of (Matching unit)) Equal to SphereofThunder3))) and do (Actions)
-
Loop - Actions
- Set SoTDummy = (Picked unit)
- Set TempLoc = (Position of SoTDummy)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 300.00 of TempLoc matching (((Matching unit) belongs to an enemy of (Owner of SoTDummy)) Equal to True)) and do (Actions)
-
Loop - Actions
- Set SoTTarget = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of SoTDummy) Equal to SphereofThunder1
-
Then - Actions
- Unit - Create 1 SoTDummy 1 for (Owner of SoTDummy) at TempLoc facing Default building facing degrees
- Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb SoTTarget
- Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of SoTDummy) Equal to SphereofThunder2
-
Then - Actions
- Unit - Create 1 SoTDummy 2 for (Owner of SoTDummy) at TempLoc facing Default building facing degrees
- Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb SoTTarget
- Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of SoTDummy) Equal to SphereofThunder3
-
Then - Actions
- Unit - Create 1 SoTDummy 3 for (Owner of SoTDummy) at TempLoc facing Default building facing degrees
- Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb SoTTarget
- Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Loop - Actions
-
Loop - Actions
-
Events