BRUTAL
I'm working
- Reaction score
- 118
Code:
Untitled Trigger 001
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Set PSUnitGroupInt = (Units in (Entire map))
Unit Group - Pick every unit in PSUnitGroupInt and do (Actions)
Loop - Actions
Trigger - Add to Thirteen <gen> the event (Unit - (Picked unit) Takes damage)
Custom script: call DestroyGroup(udg_PSUnitGroupInt)
Code:
Untitled Trigger 002
Events
Unit - A unit enters (Entire map)
Conditions
Actions
Trigger - Add to Thirteen <gen> the event (Unit - (Triggering unit) Takes damage)
Code:
Eleven
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Piercing Shot
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CV3 Less than 1000
Then - Actions
Set CV3 = (CV3 + 1)
Else - Actions
Set CV3 = 0
Set PSCaster[CV3] = (Learning Hero)
Unit - Set the custom value of PSCaster[CV3] to CV3
Unit Group - Add PSCaster[CV3] to PSUg
Code:
Thirteen
Events
Conditions
(Number of units in PSUg) Greater than 0
Actions
Unit Group - Pick every unit in PSUg and do (Actions)
Loop - Actions
Set TempInt3 = (Custom value of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Damage source) Equal to PSCaster[TempInt3]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(PSCaster[TempInt3] has buff Archery Mastery ) Equal to True
Then - Actions
Set PSMainTarget[TempInt3] = (Attacked unit)
Set PSMainPos[TempInt3] = (Position of PSMainTarget[TempInt3])
Set PSCasterPos[TempInt3] = (Position of PSCaster[TempInt3])
Set PSDummyTimer[TempInt3] = 0.00
Set PSCount[TempInt3] = 0
Set PSAngle[TempInt3] = (Angle from PSCasterPos[TempInt3] to PSMainPos[TempInt3])
Special Effect - Create a special effect attached to the origin of PSMainTarget[TempInt3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy (Last created special effect)
Unit - Create 1 PSDummy for (Owner of PSCaster[TempInt3]) at PSMainPos[TempInt3] facing PSAngle[TempInt3] degrees
Set PSDummy[TempInt3] = (Last created unit)
Unit Group - Add (Last created unit) to PSDummyUg[TempInt3]
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_PSCasterPos[udg_TempInt3])
Custom script: call RemoveLocation (udg_PSMainPos[udg_TempInt3])
Else - Actions
Set PSChance[TempInt3] = (Random integer number between (1 + (1 x (Level of Piercing Shot for PSCaster[TempInt3]))) and 10)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PSChance[TempInt3] Less than or equal to ((1 + (1 x (Level of Piercing Shot for PSCaster[TempInt3]))) + 1)
Then - Actions
Set PSMainPos[TempInt3] = (Position of PSMainTarget[TempInt3])
Set PSCasterPos[TempInt3] = (Position of PSCaster[TempInt3])
Set PSDummyTimer[TempInt3] = 0.00
Set PSCount[TempInt3] = 0
Set PSAngle[TempInt3] = (Angle from PSCasterPos[TempInt3] to PSMainPos[TempInt3])
Special Effect - Create a special effect attached to the origin of PSMainTarget[TempInt3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy (Last created special effect)
Unit - Create 1 PSDummy for (Owner of PSCaster[TempInt3]) at PSMainPos[TempInt3] facing PSAngle[TempInt3] degrees
Set PSDummy[TempInt3] = (Last created unit)
Unit Group - Add (Last created unit) to PSDummyUg[TempInt3]
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_PSCasterPos[udg_TempInt3])
Custom script: call RemoveLocation (udg_PSMainPos[udg_TempInt3])
Else - Actions
Else - Actions
Code:
Fourteen
Events
Time - Every 0.02 seconds of game time
Conditions
(Number of units in PSUg) Greater than 0
Actions
Unit Group - Pick every unit in PSUg and do (Actions)
Loop - Actions
Set TempInt3 = (Custom value of (Picked unit))
Unit Group - Pick every unit in PSDummyUg[TempInt3] and do (Actions)
Loop - Actions
Set PSDummyTimer[TempInt3] = (PSDummyTimer[TempInt3] + 0.02)
Set PSDummyPos[TempInt3] = (Position of (Picked unit))
Set PSDummyTp[TempInt3] = (PSDummyPos[TempInt3] offset by 13.00 towards PSAngle[TempInt3] degrees)
Unit - Move (Picked unit) instantly to PSDummyTp[TempInt3], facing PSAngle[TempInt3] degrees
Set PSUnitGroup2[TempInt3] = (Units within 35.00 of PSDummyPos[TempInt3] matching ((((Matching unit) belongs to an enemy of (Owner of PSDummy[TempInt3])) Equal to True) and ((Matching unit) Not equal to PSMainTarget[TempInt3])))
Unit Group - Pick every unit in PSUnitGroup2[TempInt3] and do (Actions)
Loop - Actions
Set PSCount[TempInt3] = (PSCount[TempInt3] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PSCount[TempInt3] Equal to 1
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(PSCaster[TempInt3] has buff Archery Mastery ) Equal to True
Then - Actions
Unit - Cause PSDummy[TempInt3] to damage (Picked unit), dealing (22.00 + (Real((Agility of PSCaster[TempInt3] (Include bonuses))))) damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads ((String((22 + (Agility of PSCaster[TempInt3] (Include bonuses))))) + !) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 40.00 towards 88.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
Custom script: call DestroyGroup(udg_PSUnitGroup2[udg_TempInt3])
Else - Actions
Unit - Cause PSDummy[TempInt3] to damage (Picked unit), dealing (12.00 + (Real((Agility of PSCaster[TempInt3] (Include bonuses))))) damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads ((String((12 + (Agility of PSCaster[TempInt3] (Include bonuses))))) + !) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 40.00 towards 88.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
Custom script: call DestroyGroup(udg_PSUnitGroup2[udg_TempInt3])
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy (Last created special effect)
Unit - Remove PSDummy[TempInt3] from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between PSMainPos[TempInt3] and PSDummyPos[TempInt3]) Greater than or equal to 600.00
Then - Actions
Unit - Remove (Picked unit) from the game
Else - Actions
Custom script: call RemoveLocation (udg_PSDummyPos[udg_TempInt3])
Custom script: call RemoveLocation (udg_PSDummyTp[udg_TempInt3])
so is there leaks i missed?