- Joined
- Jan 22, 2010
- Messages
- 2,583
Hello, indomitable1319 here.
I'm making a tower that when it damages a unit, the attack will create a dummy above the unit and make the dummy cast Forked Lightning, damaging units around it.
Its actual description is "Attacks fragment into 4, damaging the same unit and damaging 4 others around it."
My concept was stated on the first sentence: When the unit gets hit, a dummy will cast Forked Lightning.
There was one problem, though. When I made the custom spell abilities, and the trigger and tried it out, it caused extreme lag and caused my computer to restart.
I thought it was just creating an endless damage loop (Despite knowing that it didn't) that cause the trigger to just keep on looping so I turned it off and on, but that didn't solve the problem.
Also, the only thing that changed with the Forked Lightning is the damage, number of units hit, mana cost and cooldown; nothing else.
Here's the trigger:
I'm making a tower that when it damages a unit, the attack will create a dummy above the unit and make the dummy cast Forked Lightning, damaging units around it.
Its actual description is "Attacks fragment into 4, damaging the same unit and damaging 4 others around it."
My concept was stated on the first sentence: When the unit gets hit, a dummy will cast Forked Lightning.
There was one problem, though. When I made the custom spell abilities, and the trigger and tried it out, it caused extreme lag and caused my computer to restart.
I thought it was just creating an endless damage loop (Despite knowing that it didn't) that cause the trigger to just keep on looping so I turned it off and on, but that didn't solve the problem.
Also, the only thing that changed with the Forked Lightning is the damage, number of units hit, mana cost and cooldown; nothing else.
Here's the trigger:
-
Fragment
- Events
-
Conditions
- (Unit-type of (Damage source)) Equal to Fragmenting Tower [Level 4]
-
Actions
- Trigger - Turn off (This trigger)
- Set Fragment_Unit = (Triggering unit)
- Set Fragment_Point = (Position of Fragment_Unit)
- Unit - Create 1 Dummy Unit for (Owner of (Damage source)) at Fragment_Point facing Default building facing degrees
- Custom script: call RemoveLocation(udg_Fragment_Point)
- Set Fragment_Dummy = (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to Fragment_Dummy
- Unit - Add Fragment (Neutral Hostile) to Fragment_Dummy
- Unit - Order Fragment_Dummy to Neutral Naga Sea Witch - Forked Lightning Fragment_Unit
- Trigger - Turn on (This trigger)