Hatebreeder
So many apples
- Reaction score
- 381
You know those days, where your all bored and stuff, and you just can't think of what to do? Well, I came up with this in my Boredome.
Terra Crush:
What it does:
- Pushes all enemy Units in a 225 AOE around the caster 300 Units away, and deals damage equal to X * his Strength.
It's non-MUI
No Lagg
I also didn't find any leaks, so I guess it's leakless.
You don't need to give Credits.
Now to you people, Gimme Feedback
*Edit* Fixed a Leak, and added Implementation Instuctions ^^
Terra Crush:

- Pushes all enemy Units in a 225 AOE around the caster 300 Units away, and deals damage equal to X * his Strength.
It's non-MUI
No Lagg
I also didn't find any leaks, so I guess it's leakless.
You don't need to give Credits.
Now to you people, Gimme Feedback
Code:
Terra Crush Init
Event
Unit - A unit starts the effect of an Ability
Condition
(Ability being cast) Equal Terra Crush
Actions
Custom script: set udg_TC_Group[2] = CreateGroup()
Set TC_Caster = (Casting unit)
Set TC_CasterLocation = (Position of TC_Caster)
Specialeffect - Create a special effect at TC_CasterLocation using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Specialeffect - Destroy (Last created special effect)
Set TC_NumberOfUnits = (Number of units in (Units within 225.00 of TC_CasterLocation matching ((((Matching unit) is a Structure) Equal to False) and ((((Matching unit) is Immun against Magic) Equal to False) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is in TC_Group[2] Equal to false)))))
For each (Integer A) from 1 to TC_NumberOfUnits, do (Actions)
Loop - Actions
Set TC_Group[1] = (Random 1 units from (Units within 225.00 of TC_CasterLocation matching ((((Matching unit) is a Structure) Equal to False) and ((((Matching unit) is Immun against Magic) Equal to False) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is in TC_Group[2] Equal to false))))
Einheitengruppe - Pick every unit in TC_Group[1] and do (Actions)
Loop - Actions
Set TC_Units[(Integer A)] = (Picked unit)
Set TC_UnitsLocation[(Integer A)] = (Position of TC_Units[(Integer A)])
Set TC_Angle[(Integer A)] = (Angle from TC_CasterLocation to TC_UnitsLocation[(Integer A)])
Set TC_Distance[(Integer A)] = 300.00
Unit-Group - Add TC_Units[(Integer A)] to TC_Group[2]
Unit - Cause TC_Caster to damage TC_Units[(Integer A)], dealing ((3.00 x (Real((Level of Terra Crush for TC_Caster)))) x (Real((Kraft of TC_Caster (Including bonuses))))) damage of attack type Held and damage type Normal
Floating Text - Create floating text that reads (String(((3 x (Level of Terra Crush for TC_Caster)) x (Kraft of TC_Caster (Including bonuses))))) at TC_UnitsLocation[(Integer A)] with Z offset 0.00, using font size 12.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Deaktivieren permanence
Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
Custom script: call RemoveLocation(udg_TC_UnitsLocation[GetForLoopIndexA()])
Custom script: call DestroyGroup(udg_TC_Group[1])
Trigger - Turn on Terra Crush Effect <gen>
Code:
Terra Crush Effect
Event
Zeit - Every 0.03 seconds of game time
Condition
Action
For each (Integer A) from 1 to TC_NumberOfUnits, do (Actions)
Loop - Actions
Set TC_UnitsLocation[(Integer A)] = (Position of TC_Units[(Integer A)])
Set TC_MoveLocation[(Integer A)] = (TC_UnitsLocation[(Integer A)] offset by 12.00 towards TC_Angle[(Integer A)] degrees)
Unit - Move TC_Units[(Integer A)] instantly to TC_MoveLocation[(Integer A)], facing TC_Angle[(Integer A)] degrees
Set TC_Distance[(Integer A)] = (TC_Distance[(Integer A)] - 12.00)
Specialeffect - Create a special effect at TC_MoveLocation[(Integer A)] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Specialeffect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_TC_UnitsLocation[GetForLoopIndexA()])
Custom script: call RemoveLocation(udg_TC_MoveLocation[GetForLoopIndexA()])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Conditions
TC_Distance[(Integer A)] smaller equal 0.00
'THEN'-Actions
Set TC_Count = (TC_Count + 1)
'ELSE'-Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Conditions
TC_Count Greater equal TC_NumberOfUnits
'THEN'-Actions
Set TC_Count = 0
Unit-Group - Remove all units from TC_Group[2]
Custom script: call DestroyGroup(udg_TC_Group[2])
Custom script: call RemoveLocation(udg_TC_CasterLocation)
Trigger - Turn off (This trigger)
'ELSE'-Action
*Edit* Fixed a Leak, and added Implementation Instuctions ^^
Attachments
-
58.3 KB Views: 577