UPDATE: Here is how it works:
Since my map is a rainy map, I used the 'Crushing Wave' Special Effect, so when units are pushed back, their feet sliding against the water, it looks more realistic. You may switch this Special Effect out for a 'Dust-like' Special Effect, or whatever else you think is more fitting for your map.
The Configuration:
The Loop (make sure to un-check Initially ON for this trigger)
============================================
There is a spell in my game called 'Thunder Slam' and I cannot get it to push back all units surrounding the unit casting my 'Thunder Slam' spell.
I read a couple guides on this kind of thing for GUI, but the guy said there was a lag issue (not a leak issue,) because the skill relied on Event - Game Time - Every X Seconds of Game Time, then IF and Actions, which I want to avoid. The guy then said vJASS is required so it wouldn't do this, and I have not an inkling of knowledge in it.
All I have is this, and even in the first action line, I was told by someone in Hive's Chat that it leaks (or lags, I cannot remember which one.) However, it's not to my knowledge why. I didn't get his explanation(s).
P.S. In one big failing attempt I did something to my trigger and it made all the units go to the center of the map, even though nothing in my action lines told them to. I have since erased all of what was in that code of fail-whaleness. It was weird.
Since my map is a rainy map, I used the 'Crushing Wave' Special Effect, so when units are pushed back, their feet sliding against the water, it looks more realistic. You may switch this Special Effect out for a 'Dust-like' Special Effect, or whatever else you think is more fitting for your map.
The Configuration:
-
Thunder Slam Config
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Thunder Slam
-
-

Actions
-


Environment - Stop all active terrain deformations instantly
-


Set tempUnit = (Triggering unit)
-


Set Abil = (Ability being cast)
-


Set AbilLvl = (Level of Abil for tempUnit)
-


Set PushDist = 200.00
-


Set tempPoint = (Position of tempUnit)
-


Custom script: set bj_wantDestroyGroup = true
-


Unit Group - Pick every unit in (Units within 315.00 of tempPoint) and do (Actions)
-



Loop - Actions
-




Set tempUnit = (Picked unit)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(tempUnit is A structure) Equal to False
-






(tempUnit is alive) Equal to True
-






(tempUnit belongs to an enemy of (Triggering player)) Equal to True
-
-





Then - Actions
-






Set tempPoint2 = (Position of tempUnit)
-






Set PushAngle = (Angle from tempPoint to tempPoint2)
-






Custom script: set udg_Handle2 = GetHandleId(udg_tempUnit)
-






Custom script: call SaveReal(udg_Hash, udg_Handle2, 0, udg_PushDist)
-






Custom script: call SaveReal(udg_Hash, udg_Handle2, 1, udg_PushAngle)
-






Unit Group - Add (Picked unit) to PushedUnits
-






Custom script: call RemoveLocation(udg_tempPoint2)
-
-





Else - Actions
-
-
-
-


Trigger - Turn on Thunder Slam Pushback <gen>
-


Custom script: call RemoveLocation(udg_tempPoint)
-
-
-
Thunder Slam Pushback
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Number of units in PushedUnits) Greater than 0
-
-



Then - Actions
-




Unit Group - Pick every unit in PushedUnits and do (Actions)
-





Loop - Actions
-






Set tempUnit = (Picked unit)
-






Set tempPoint = (Position of tempUnit)
-






Custom script: set udg_Handle2 = GetHandleId(udg_tempUnit)
-






Custom script: set udg_PushDist = LoadReal(udg_Hash, udg_Handle2, 0)
-






Custom script: set udg_PushAngle = LoadReal(udg_Hash, udg_Handle2, 1)
-






Set tempPoint2 = (tempPoint offset by 5.00 towards PushAngle degrees)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








PushDist Greater than 0.00
-
-







Then - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Random integer number between 1 and 2) Equal to 1
-
-









Then - Actions
-










Special Effect - Create a special effect at tempPoint2 using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
-










Special Effect - Destroy (Last created special effect)
-
-









Else - Actions
-
-








Unit - Move tempUnit instantly to tempPoint2
-








Custom script: call SaveReal(udg_Hash, udg_Handle2, 0, udg_PushDist-5)
-
-







Else - Actions
-








Unit Group - Remove tempUnit from PushedUnits
-








Custom script: call SaveReal(udg_Hash, udg_Handle2, 0, 0)
-








Custom script: call SaveReal(udg_Hash, udg_Handle2, 1, 0)
-
-
-






Custom script: call RemoveLocation(udg_tempPoint)
-






Custom script: call RemoveLocation(udg_tempPoint2)
-
-
-
-



Else - Actions
-




Trigger - Turn off (This trigger)
-
-
-
-
There is a spell in my game called 'Thunder Slam' and I cannot get it to push back all units surrounding the unit casting my 'Thunder Slam' spell.
I read a couple guides on this kind of thing for GUI, but the guy said there was a lag issue (not a leak issue,) because the skill relied on Event - Game Time - Every X Seconds of Game Time, then IF and Actions, which I want to avoid. The guy then said vJASS is required so it wouldn't do this, and I have not an inkling of knowledge in it.
All I have is this, and even in the first action line, I was told by someone in Hive's Chat that it leaks (or lags, I cannot remember which one.) However, it's not to my knowledge why. I didn't get his explanation(s).
-
Thunder Slam
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Thunder Slam
-
-

Actions
-


Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 315.00 at (Position of (Casting unit)), dealing 0.00 damage of attack type Normal and damage type Normal
-


Environment - Stop all active terrain deformations instantly
-
-
P.S. In one big failing attempt I did something to my trigger and it made all the units go to the center of the map, even though nothing in my action lines told them to. I have since erased all of what was in that code of fail-whaleness. It was weird.
Last edited:
