Jagan
New Member
- Reaction score
- 30
Hi people, I need someone to look at my triggers and tell me what's wrong. It works fine for the first few casts but after a while it stops working. The dummy moves as intended but the damage and slow is not applied. Thanks in advance!
PS. Oh and if there are any leaks, please point me in removing them!
EDIT: The map is uploaded HERE
PS. Oh and if there are any leaks, please point me in removing them!
Code:
Chakram Throw Init
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Chakram Throw (Soul Hunter)
Actions
Set ChakramThrowDistance = 0.00
Set ChakramThrowCaster = (Triggering unit)
Set ChakramThrowCasterPoint = (Position of ChakramThrowCaster)
Set ChakramThrowTargetPoint = (Target point of ability being cast)
Unit - Make ChakramThrowCaster face ChakramThrowTargetPoint over 0.01 seconds
Unit - Create 1 Dummy Unit (Chakram Throw) for (Owner of ChakramThrowCaster) at ChakramThrowCasterPoint facing ChakramThrowTargetPoint
Set ChakramThrowDummyUnit = (Last created unit)
Set ChakramThrowDummyPoint = (Position of ChakramThrowDummyUnit)
Set ChakramThrowFacingDirection = (Facing of ChakramThrowDummyUnit)
Trigger - Turn on Chakram Throw Move And Damage <gen>
Countdown Timer - Start ChakramThrowTimer as a Repeating timer that will expire in 0.04 seconds
Custom script: call RemoveLocation (udg_ChakramThrowCasterPoint)
Code:
Chakram Throw Move And Damage
Events
Time - ChakramThrowTimer expires
Conditions
Actions
Set ChakramThrowDistance = (ChakramThrowDistance + 36.00)
Set ChakramThrowDummyPoint = (Position of ChakramThrowDummyUnit)
Set ChakramThrowOffset = (ChakramThrowDummyPoint offset by 30.00 towards ChakramThrowFacingDirection degrees)
Set ChakramThrowGroup = (Units within 225.00 of ChakramThrowDummyPoint matching ((((Matching unit) belongs to an enemy of (Owner of ChakramThrowCaster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Match
Unit - Move ChakramThrowDummyUnit instantly to ChakramThrowOffset, facing ChakramThrowFacingDirection degrees
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in ChakramThrowGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in ChakramThrowAddUnitGroup) Equal to False
Then - Actions
Unit Group - Add (Picked unit) to ChakramThrowAddUnitGroup
Unit - Cause ChakramThrowCaster to damage (Picked unit), dealing (25.00 + (75.00 x (Real((Level of Chakram Throw (Soul Hunter) for ChakramThrowCaster))))) damage of attack type Spells and damage type Normal
Unit - Create 1 Dummy Unit for (Owner of ChakramThrowCaster) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Chakram Throw (Maim) to (Last created unit)
Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ChakramThrowDistance Greater than (600.00 + (100.00 x (Real((Level of Chakram Throw (Soul Hunter) for ChakramThrowCaster)))))
Then - Actions
Countdown Timer - Pause ChakramThrowTimer
Unit - Add a 0.01 second Generic expiration timer to ChakramThrowDummyUnit
Set ChakramThrowDistance = 0.00
Trigger - Turn off (This trigger)
Else - Actions
Custom script: call RemoveLocation (udg_ChakramThrowDummyPoint)
Custom script: call RemoveLocation (udg_ChakramThrowOffset)
Custom script: call RemoveLocation (udg_ChakramThrowTargetPoint)
EDIT: The map is uploaded HERE