- Joined
- Jul 27, 2015
- Messages
- 29
Hey guys, I think this is my first post though I have been lurking the forums for a far while picking up tips and stuff
I am completely lost when it comes to this trigger I've tried to write
Intended Result: Every 0.02 seconds of game time, if unit is in check group, they are moved in a predefined direction and damage all nearby enemy units that have not already been damaged by this instance of the spell
Actual Result: Every 0.02 seconds of game time, the unit moves forward and damages all nearby enemy units, regardless of if they have been damaged before
Here's my trigger, or at least the section that handles movement and damage, I initialize? (not sure if that's the right term in this system) all my variables in a cast function that then switches this function on...
Thanks in advance
~Sadathy
EDIT: Forgot to mention I am completely aware that this leaks, I prefer to put in the stuff that cleans up leaks after I have a spell working completely - also my variable names might not be the best in certain cases
I am completely lost when it comes to this trigger I've tried to write
Intended Result: Every 0.02 seconds of game time, if unit is in check group, they are moved in a predefined direction and damage all nearby enemy units that have not already been damaged by this instance of the spell
Actual Result: Every 0.02 seconds of game time, the unit moves forward and damages all nearby enemy units, regardless of if they have been damaged before
Here's my trigger, or at least the section that handles movement and damage, I initialize? (not sure if that's the right term in this system) all my variables in a cast function that then switches this function on...
-
SavageryMover
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
Do Multiple ActionsFor each (Integer myLoop) from 1 to 8192, do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(savageryCaster[myLoop] is in savageryChannelingIyaris) Equal to (==) True
-
-
Then - Actions
-
Set tempPoint = (Position of savageryCaster[myLoop])
-
Set newPoint = (tempPoint offset by 8.00 towards savageryAngle[myLoop] degrees)
-
Set tempReal = (X of newPoint)
-
Custom script: call SetUnitX(udg_savageryCaster[udg_myLoop], udg_tempReal)
-
Set tempReal = (Y of newPoint)
-
Custom script: call SetUnitY(udg_savageryCaster[udg_myLoop], udg_tempReal)
-
Set tempGroup = (Units within 250.00 of newPoint)
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A structure) Not equal to (!=) True
-
((Picked unit) is alive) Equal to (==) True
-
((Owner of savageryCaster[myLoop]) is an enemy of (Owner of (Picked unit))) Equal to (==) True
-
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is in savageryAlreadyHit[myLoop]) Equal to (==) False
-
-
Then - Actions
-
Unit - Cause savageryCaster[myLoop] to damage (Picked unit), dealing ((25.00 + (50.00 x (Real((Level of Savagery for savageryCaster[myLoop]))))) + (Real((Intelligence of savageryCaster[myLoop] (Include bonuses))))) damage of attack type Hero and damage type Normal
-
Unit Group - Add (Picked unit) to savageryAlreadyHit[myLoop]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Conditions
-
(Distance between newPoint and savageryTarget[myLoop]) Less than (<) 8.00
-
savageryTimeout[myLoop] Less than (<) 0.00
-
-
-
-
Then - Actions
-
Unit Group - Remove savageryCaster[myLoop] from savageryChannelingIyaris
-
Unit - Remove Spell Immunity (Archimonde) from savageryCaster[myLoop]
-
Animation - Change savageryCaster[myLoop]'s animation speed to 100.00% of its original speed
-
-
Else - Actions
-
-
-
-
Else - Actions
-
-
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in savageryChannelingIyaris) Equal to (==) 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Thanks in advance
~Sadathy
EDIT: Forgot to mention I am completely aware that this leaks, I prefer to put in the stuff that cleans up leaks after I have a spell working completely - also my variable names might not be the best in certain cases
Last edited: