THE_X
New Member
- Reaction score
- 49
So when i enable these 5 triggers, the game starts to lag bad, i don't know if its a leak i don't see any but i know its these 4 triggers.
Code:
Create Ball
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Demon 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 Demon Ball Dummy 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.03 seconds of game time
Conditions
Actions
Set Group[1] = (Units of type Demon Ball Dummy)
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
Set Unit[1] = (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 18.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 Demon Ball Dummy for (Owner of (Picked unit)) at Point[1] facing ((Facing of (Picked unit)) 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\Orc\FeralSpirit\feralspiritdone.mdl
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ball_Timer[(Custom value of (Last created unit))] Less than or equal to 0.00
Then - Actions
Unit - Remove (Last created unit) from the game
Else - Actions
Else - Actions
Unit - Move (Picked unit) instantly to Point[2]
Destructible - Pick every destructible within 80.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 Demon Ball Dummy for (Owner of (Picked unit)) at Point[1] facing ((Facing of (Picked unit)) 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 Unit[1])
Unit - Remove Unit[1] from the game
Special Effect - Create a special effect at Point[1] using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.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
Ball_Timer[(Custom value of (Last created unit))] Less than or equal to 0.00
Then - Actions
Unit - Remove (Last created unit) from the game
Else - Actions
Destructible - Kill (Picked destructible)
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 Demon Ball Dummy
Then - Actions
Set Point[3] = (Position of (Picked unit))
Unit - Create 1 Demon Ball Dummy for (Owner of Unit[1]) at Point[1] facing ((Facing of (Picked unit)) x 2.00) degrees
Unit - Add a Ball_Timer[(Custom value of Unit[1])] second Generic expiration timer to (Last created unit)
Unit - Set the custom value of (Last created unit) to (Custom value of Unit[1])
Unit - Remove Unit[1] from the game
Special Effect - Create a special effect at Point[1] using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.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
Ball_Timer[(Custom value of (Last created unit))] Less than or equal to 0.00
Then - Actions
Unit - Remove (Last created unit) from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of (Owner of Unit[1])) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Picked unit)) Less than 1
Then - Actions
Set MUI = (MUI + 1)
Unit - Set the custom value of (Picked unit) to MUI
Else - Actions
Set Slide_Angle[(Custom value of (Picked unit))] = (Angle from Point[3] to Point[2])
Unit - Create 1 Dummy for (Owner of Unit[1]) 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 Demon Ball for Ball_Caster[(Custom value of Unit[1])])
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)
Unit - Create 1 Attacking Dummy for (Owner of Unit[1]) at Point[2] facing Default building facing degrees
Unit - Add Demon Ball Posion to (Last created unit)
Unit - Order (Last created unit) to Attack (Picked unit)
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Else - Actions
Else - Actions
Custom script: call RemoveLocation (udg_Point[2])
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call DestroyGroup (udg_Group[2])
Set Unit[1] = No unit
Custom script: call DestroyGroup (udg_Group[1])
Code:
Slide Ball Target
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Set Group[1] = (Units in (Entire map) matching (((Matching unit) has buff Demon Ball [Slide] ) 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 10.00 towards Slide_Angle[(Custom value 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 0.01 seconds of game time
Conditions
Actions
Set Group[1] = (Units of type Demon Ball Dummy)
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))] - 0.01)
Custom script: call DestroyGroup (udg_Group[1])
Code:
Remove Balll
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Demon Ball Dummy
Actions
Unit - Remove (Triggering unit) from the game