- Joined
- Apr 4, 2011
- Messages
- 995
I was working on a spell, messing around, and I came upon a problem that I don't know how to solve, the damage part of the spell isn't working correctly.
Put simply, the spell is supposed to make two flying sheep that spin around the cast point, dealing damage to the units it contacts with. I got the unit movement part, so far the spell makes two flying sheep that do a sideways eight around the cast point, but the spell doesn't do any damage. (The lightning strikes part is something unrelated don't worry about it)
Any help on this would be appreciated. Thanks
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set Scythe_Hash = (Last created hashtable)
-
-------- Level 1 --------
-
Set Scythe_Damage[1] = 40.00
-
Set Lightning_Strikes[1] = 2
-
-------- Level 2 --------
-
Set Scythe_Damage[2] = 80.00
-
Set Lightning_Strikes[2] = 3
-
-------- Level 3 --------
-
Set Scythe_Damage[3] = 120.00
-
Set Lightning_Strikes[3] = 4
-
-------- Level 4 --------
-
Set Scythe_Damage[4] = 160.00
-
Set Lightning_Strikes[4] = 5
-
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Wind Scythe
-
-
Actions
-
Set Scythe_Level = (Level of Wind Scythe for (Triggering unit))
-
Set Point1 = (Target point of ability being cast)
-
Special Effect - Create a special effect at Point1 using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-
Set Point2 = (Point1 offset by 80.00 towards 0.00 degrees)
-
Unit - Create 1 Wind Scythe for (Owner of (Triggering unit)) at Point2 facing 90.00 degrees
-
Unit - Add a 3.20 second Generic expiration timer to (Last created unit)
-
Set Point2 = (Point1 offset by 80.00 towards 180.00 degrees)
-
Unit Group - Add (Last created unit) to Wind_Scythe_Unit
-
Unit - Create 1 Wind Scythe for (Owner of (Triggering unit)) at Point2 facing 270.00 degrees
-
Unit - Add a 3.20 second Generic expiration timer to (Last created unit)
-
Unit Group - Add (Last created unit) to Wind_Scythe_Unit
-
Hashtable - Save Scythe_Level as 1 of (Key (Triggering unit)) in Scythe_Hash
-
Custom script: call RemoveLocation(udg_Point1)
-
Custom script: call RemoveLocation(udg_Point2)
-
Special Effect - Destroy (Last created special effect)
-
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in Wind_Scythe_Unit and do (Actions)
-
Loop - Actions
-
Set Wind_Scythe = (Picked unit)
-
Set CastAngle = ((Facing of Wind_Scythe) + 4.00)
-
Set Scythe_Level = (Load 1 of (Key (Picked unit)) from (Last created hashtable))
-
Set Point1 = (Position of (Picked unit))
-
Set Point2 = (Point1 offset by 12.00 towards ((Facing of (Picked unit)) + 4.00) degrees)
-
Unit - Move Wind_Scythe instantly to Point2, facing CastAngle degrees
-
Unit Group - Pick every unit in (Units within 50.00 of Point2 matching (((Picked unit) belongs to an enemy of (Owner of Wind_Scythe)) Equal to True)) and do (Actions)
-
Loop - Actions
-
Unit - Cause Wind_Scythe to damage (Picked unit), dealing Scythe_Damage[Scythe_Level] damage of attack type Spells and damage type Normal
-
Special Effect - Create a special effect at Point2 using Objects\Spawnmodels\Other\BeastmasterBlood\BeastmasterBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Custom script: call RemoveLocation(udg_Point1)
-
Custom script: call RemoveLocation(udg_Point2)
-
-
-
Any help on this would be appreciated. Thanks