THE_X
New Member
- Reaction score
- 49
Bouncy Ball
Sends a ball to a targeted location bouncing off walls, trees, and ground units, if it comes into contact with an enemy ground unit the unit will be pushed back and dealt damage
Ball lasts 10 seconds.
cant really get the effect with a screen shot
MUI/MPI - Both
GUI/Jass - GUI
Leakless - Think so, yea
Fun - Yeppers
Code:
Create Ball
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Bouncy Ball
Actions
Set Point[1] = (Position of (Triggering unit))
Set Point[2] = (Target point of ability being cast)
Set Point[3] = (Point[1] offset by 60.00 towards (Angle from Point[1] to Point[2]) degrees)
Set MUI = (MUI + 1)
Unit - Create 1 Bouncy Ball for (Owner of (Triggering unit)) at Point[3] facing Point[2]
Unit - Set the custom value of (Last created unit) to MUI
Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
Set Ball_Timer[(Custom value of (Last created unit))] = 10.00
Set Ball_Caster[(Custom value of (Last created unit))] = (Triggering unit)
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call RemoveLocation (udg_Point[2])
Custom script: call RemoveLocation (udg_Point[3])
Code:
Slide Ball
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Set Group[1] = (Units of type Bouncy Ball)
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
Set Unit = (Picked unit)
Set Point[1] = (Position of (Picked unit))
Custom script: set udg_Ball_Height[1] = GetLocationZ(udg_Point[1])
Set Point[2] = (Point[1] offset by 6.00 towards (Facing of (Picked unit)) degrees)
Custom script: set udg_Ball_Height[2] = GetLocationZ(udg_Point[2])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ball_Height[2] Greater than or equal to (Ball_Height[1] + 3.50)
Then - Actions
Unit - Create 1 Bouncy Ball for (Owner of (Picked unit)) at Point[1] facing ((Facing of (Picked unit)) + ((Angle from Point[1] to Point[2]) x 2.00)) degrees
Unit - Add a Ball_Timer[(Custom value of (Picked unit))] second Generic expiration timer to (Last created unit)
Unit - Set the custom value of (Last created unit) to (Custom value of (Picked unit))
Unit - Remove (Picked unit) from the game
Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Unit - Move (Picked unit) instantly to Point[2]
Destructible - Pick every destructible within 50.00 of Point[2] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked destructible) is alive) Equal to True
Or - Any (Conditions) are true
Conditions
(Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
(Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
(Destructible-type of (Picked destructible)) Equal to Ashenvale Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Barrens Tree Wall
(Destructible-type of (Picked destructible)) Equal to Barrens Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Black Citadel Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Fall Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Snowy Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Summer Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Winter Tree Wall
(Destructible-type of (Picked destructible)) Equal to Cityscape Ruined Tree Wall
(Destructible-type of (Picked destructible)) Equal to Dalaran Ruins Tree Wall
(Destructible-type of (Picked destructible)) Equal to Dungeon Tree Wall
(Destructible-type of (Picked destructible)) Equal to Felwood Tree Wall
(Destructible-type of (Picked destructible)) Equal to Felwood Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Icecrown Tree Wall
(Destructible-type of (Picked destructible)) Equal to Icecrown Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Northrend Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Fall Tree Wall
(Destructible-type of (Picked destructible)) Equal to Northrend Tree Wall
(Destructible-type of (Picked destructible)) Equal to Snowy Tree Wall
(Destructible-type of (Picked destructible)) Equal to Outland Tree Wall
(Destructible-type of (Picked destructible)) Equal to Ruins Tree Wall
(Destructible-type of (Picked destructible)) Equal to Ruins Canopy Tree
(Destructible-type of (Picked destructible)) Equal to Underground Tree Wall
(Destructible-type of (Picked destructible)) Equal to Village Tree Wall
(Destructible-type of (Picked destructible)) Equal to Village Tree Wall
Then - Actions
Set Point[3] = (Position of (Picked destructible))
Unit - Create 1 Bouncy Ball for (Owner of Unit) at Point[1] facing ((Facing of Unit) + ((Angle from Point[2] to Point[3]) x 2.00)) degrees
Unit - Add a Ball_Timer[(Custom value of Unit)] second Generic expiration timer to (Last created unit)
Unit - Set the custom value of (Last created unit) to (Custom value of Unit)
Unit - Remove Unit from the game
Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_Point[3])
Else - Actions
Set Group[2] = (Units within 50.00 of Point[2] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A ground unit) Equal to True)))
Unit Group - Pick every unit in Group[2] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Not equal to Bouncy Ball
Then - Actions
Set Point[3] = (Position of (Picked unit))
Unit - Create 1 Bouncy Ball for (Owner of Unit) at Point[1] facing ((Facing of Unit) + ((Angle from Point[2] to Point[3]) x 2.00)) degrees
Unit - Add a Ball_Timer[(Custom value of Unit)] second Generic expiration timer to (Last created unit)
Unit - Set the custom value of (Last created unit) to (Custom value of Unit)
Unit - Remove Unit from the game
Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_Point[3])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Not equal to Ball_Target[(Custom value of Unit)]
((Picked unit) belongs to an enemy of (Owner of Unit)) Equal to True
Then - Actions
Unit - Create 1 Dummy for (Owner of Unit) at Point[2] facing Default building facing degrees
Unit - Add Bouncy Ball Pushback to (Last created unit)
Unit - Set level of Bouncy Ball Pushback for (Last created unit) to (Level of Bouncy Ball for Ball_Caster[(Custom value of Unit)])
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Set Ball_Target[(Custom value of Unit)] = (Picked unit)
Else - Actions
Else - Actions
Custom script: call DestroyGroup (udg_Group[2])
Set Unit = No unit
Custom script: call RemoveLocation (udg_Point[2])
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call DestroyGroup (udg_Group[1])
Code:
Slide Ball Target
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Set Group[1] = (Units in (Playable map area) matching (((Matching unit) has buff Bouncy Ball ) Equal to True))
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
Set Point[1] = (Position of (Picked unit))
Set Point[2] = (Point[1] offset by 4.00 towards (180.00 + (Facing of (Picked unit))) degrees)
Unit - Move (Picked unit) instantly to Point[2]
Special Effect - Create a special effect at Point[2] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_Group[1])
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call RemoveLocation (udg_Point[2])
Code:
Ball Timer
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set Group[1] = (Units of type Bouncy Ball)
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
Set Ball_Timer[(Custom value of (Picked unit))] = (Ball_Timer[(Custom value of (Picked unit))] - 1.00)
Custom script: call DestroyGroup (udg_Group[1])
Code:
Remove Balll
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Bouncy Ball
Actions
Unit - Remove (Triggering unit) from the game