- Joined
- Feb 11, 2010
- Messages
- 199
So... this custom triggered spell works (though is obviously not MUI/optimized etc yet, and I need to get rid of that wait in the middle somehow), except when I added in the "Call Destroy Group" script at the end (Specifically, Custom script: call DestroyGroup(udg_ImpaleTargetGroup[0])). If I disable that line, it goes back to working fine, but when enabled, the first usage of the spell works, then all future uses cause it to instantly kill an enemy. I can't quite put my finger on what's wrong...
Can anyone help? +Rep for helpers, of course.
PS: Would also like advice on what should be used instead of waits in situations like this.
Can anyone help? +Rep for helpers, of course.
PS: Would also like advice on what should be used instead of waits in situations like this.
-
Impale
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Impale
-
-
Actions
-
Set ImpaleCaster[0] = (Casting unit)
-
Set ImpaleOwner[0] = (Owner of ImpaleCaster[0])
-
Set ImpalePoint1[0] = (Position of (Casting unit))
-
Set ImpalePoint2[0] = (Target point of ability being cast)
-
Set ImpaleAngle[0] = (Angle from ImpalePoint1[0] to ImpalePoint2[0])
-
Animation - Change ImpaleCaster[0]'s animation speed to 0.00% of its original speed
-
For each (Integer IMP[0]) from 1 to 32, do (Actions)
-
Loop - Actions
-
Set ImpalePoint3[0] = (ImpalePoint1[0] offset by (10.00 x (Real(IMP[0]))) towards ImpaleAngle[0] degrees)
-
Set ImpaleTempGroup[0] = (Units within 100.00 of ImpalePoint3[0])
-
Unit Group - Pick every unit in ImpaleTempGroup[0] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) belongs to an enemy of ImpaleOwner[0]) Equal to True
-
((Picked unit) is Magic Immune) Equal to False
-
((Picked unit) is alive) Equal to True
-
((Picked unit) is in ImpaleTargetGroup[0]) Equal to False
-
-
Then - Actions
-
Unit Group - Add (Picked unit) to ImpaleTargetGroup[0]
-
Unit - Pause (Picked unit)
-
Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
-
Unit - Cause ImpaleCaster[0] to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Normal
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_ImpalePoint3[0])
-
Custom script: call DestroyGroup(udg_ImpaleTempGroup[0])
-
-
-
Unit - Create 1 Dummy(ImpaleSpawn) for ImpaleOwner[0] at ImpalePoint1[0] facing ImpaleAngle[0] degrees
-
Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
Set ImpalePoint3[0] = (ImpalePoint1[0] offset by 150.00 towards ImpaleAngle[0] degrees)
-
Unit - Create 1 Dummy(ImpaleRed) for ImpaleOwner[0] at ImpalePoint3[0] facing (ImpaleAngle[0] - 180.00) degrees
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
Wait 1.50 seconds
-
Animation - Change ImpaleCaster[0]'s animation speed to 100.00% of its original speed
-
Unit Group - Pick every unit in ImpaleTargetGroup[0] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Unit Group - Remove (Picked unit) from ImpaleTargetGroup[0]
-
Unit - Unpause (Picked unit)
-
Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
-
Unit - Cause ImpaleCaster[0] to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Normal
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_ImpaleTargetGroup[0])
-
Custom script: call RemoveLocation(udg_ImpalePoint1[0])
-
Custom script: call RemoveLocation(udg_ImpalePoint2[0])
-
Custom script: call RemoveLocation(udg_ImpalePoint3[0])
-
-