- Joined
- Aug 20, 2004
- Messages
- 65
I just copied a GUI Wild Axes from a DotA spell pack into another map but after one use there was a drop in the FPS. More uses = more lag, so I'm guessing there are memory leaks. I'm on a mac, so no leak dectecting software for me. Can some one give this the once-over?
-
Wild Axe Initialisation
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Wild Axe
-
Actions
- Set WildAxe_Caster = (Triggering unit)
- Set WildAxe_Caster_Loc = (Position of WildAxe_Caster)
- Set WildAxe_Target_Loc = (Target point of ability being cast)
- Set WildAxe_Angle = (Angle from WildAxe_Caster_Loc to WildAxe_Target_Loc)
- Set WildAxe_Distance = (Distance between WildAxe_Caster_Loc and WildAxe_Target_Loc)
- Set WildAxe_Interval = ((WildAxe_Distance / 25.00) + ((15.00 / 1000.00) x WildAxe_Distance))
- Unit - Create 1 Wild Axe Dummy (Level 1) for (Owner of WildAxe_Caster) at WildAxe_Caster_Loc facing WildAxe_Angle degrees
- Set WildAxe_Dummy[1] = (Last created unit)
- Unit - Create 1 Wild Axe Dummy (Level 1) for (Owner of WildAxe_Caster) at WildAxe_Caster_Loc facing WildAxe_Angle degrees
- Set WildAxe_Dummy[2] = (Last created unit)
- Countdown Timer - Start WildAxe_Timer as a Repeating timer that will expire in 0.04 seconds
-
Events
-
Wild Axe Movement
-
Events
- Time - WildAxe_Timer expires
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WildAxe_Counter Less than or equal to 10
-
Then - Actions
- Set WildAxe_Counter = (WildAxe_Counter + 1)
- Set WildAxe_Dummy_Loc_1 = (Position of WildAxe_Dummy[1])
- Set WildAxe_Dummy_Loc_2 = (Position of WildAxe_Dummy[2])
- Unit - Move WildAxe_Dummy[1] instantly to (WildAxe_Dummy_Loc_1 offset by WildAxe_Interval towards ((WildAxe_Angle + 40.00) - (4.00 x WildAxe_Tilt[1])) degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_Group
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_1 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_1)
- Unit - Move WildAxe_Dummy[2] instantly to (WildAxe_Dummy_Loc_2 offset by WildAxe_Interval towards ((WildAxe_Angle - 40.00) + (4.00 x WildAxe_Tilt[1])) degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_Group
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_2 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_2)
- Set WildAxe_Tilt[1] = (WildAxe_Tilt[1] + 1.00)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WildAxe_Counter Less than or equal to 20
-
Then - Actions
- Set WildAxe_Counter = (WildAxe_Counter + 1)
- Set WildAxe_Dummy_Loc_1 = (Position of WildAxe_Dummy[1])
- Set WildAxe_Dummy_Loc_2 = (Position of WildAxe_Dummy[2])
- Unit - Move WildAxe_Dummy[1] instantly to (WildAxe_Dummy_Loc_1 offset by WildAxe_Interval towards ((WildAxe_Angle - 40.00) + (4.00 x WildAxe_Tilt2)) degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_Group
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_1 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_1)
- Unit - Move WildAxe_Dummy[2] instantly to (WildAxe_Dummy_Loc_2 offset by WildAxe_Interval towards ((WildAxe_Angle + 40.00) - (4.00 x WildAxe_Tilt2)) degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_Group
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_2 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_2)
- Set WildAxe_Tilt2 = (WildAxe_Tilt2 - 1.00)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WildAxe_Counter Less than or equal to 30
-
Then - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Caster_Loc)
- Set WildAxe_Caster_Loc = (Position of WildAxe_Caster)
- Set WildAxe_Counter = (WildAxe_Counter + 1)
- Set WildAxe_Dummy_Loc_1 = (Position of WildAxe_Dummy[1])
- Set WildAxe_Dummy_Loc_2 = (Position of WildAxe_Dummy[2])
- Set WildAxe_ReturnDistance_1 = (Distance between WildAxe_Caster_Loc and WildAxe_Dummy_Loc_1)
- Set WildAxe_ReturnInterval_1 = (WildAxe_ReturnDistance_1 / 20.00)
- Set WildAxe_ReturnDistance_2 = (Distance between WildAxe_Caster_Loc and WildAxe_Dummy_Loc_2)
- Set WildAxe_ReturnInterval_2 = (WildAxe_ReturnDistance_2 / 20.00)
- Set WildAxe_RetunAngle_1 = ((Angle from WildAxe_Caster_Loc to WildAxe_Dummy_Loc_1) - 180.00)
- Set WildAxe_RetunAngle_2 = ((Angle from WildAxe_Caster_Loc to WildAxe_Dummy_Loc_2) - 180.00)
- Unit - Move WildAxe_Dummy[1] instantly to (WildAxe_Dummy_Loc_1 offset by WildAxe_ReturnInterval_1 towards ((WildAxe_RetunAngle_1 + 33.00) - (3.00 x WildAxe_Tilt[3])) degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_ReturnGroup
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_1 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_1)
- Unit - Move WildAxe_Dummy[2] instantly to (WildAxe_Dummy_Loc_2 offset by WildAxe_ReturnInterval_2 towards ((WildAxe_RetunAngle_2 - 33.00) + (3.00 x WildAxe_Tilt[3])) degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_ReturnGroup
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_2 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_2)
- Set WildAxe_Tilt[3] = (WildAxe_Tilt[3] + 1.00)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WildAxe_Counter Greater than 30
-
Then - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Caster_Loc)
- Set WildAxe_Caster_Loc = (Position of WildAxe_Caster)
- Set WildAxe_Dummy_Loc_1 = (Position of WildAxe_Dummy[1])
- Set WildAxe_Dummy_Loc_2 = (Position of WildAxe_Dummy[2])
- Set WildAxe_Check[1] = (Distance between WildAxe_Caster_Loc and WildAxe_Dummy_Loc_1)
- Set WildAxe_Check[2] = (Distance between WildAxe_Caster_Loc and WildAxe_Dummy_Loc_2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (WildAxe_Check[1] Greater than 20.00) or (WildAxe_Check[2] Greater than 20.00)
-
Then - Actions
- Set WildAxe_ReturnInterval_1 = 35.00
- Set WildAxe_ReturnInterval_2 = 35.00
- Set WildAxe_RetunAngle_1 = ((Angle from WildAxe_Caster_Loc to WildAxe_Dummy_Loc_1) - 180.00)
- Set WildAxe_RetunAngle_2 = ((Angle from WildAxe_Caster_Loc to WildAxe_Dummy_Loc_2) - 180.00)
- Unit - Move WildAxe_Dummy[1] instantly to (WildAxe_Dummy_Loc_1 offset by WildAxe_ReturnInterval_1 towards WildAxe_RetunAngle_1 degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_ReturnGroup
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_1 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_1)
- Unit - Move WildAxe_Dummy[2] instantly to (WildAxe_Dummy_Loc_2 offset by WildAxe_ReturnInterval_2 towards WildAxe_RetunAngle_2 degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 88.00 of WildAxe_Dummy_Loc_2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WildAxe_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit and do (Actions)
-
Loop - Actions
- Unit - Cause WildAxe_Caster to damage (Picked unit), dealing (30.00 + (30.00 x (Real((Level of Wild Axe for WildAxe_Caster))))) damage of attack type Chaos and damage type Normal
- Unit Group - Add (Picked unit) to WildAxe_ReturnGroup
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Destructible - Pick every destructible within 120.00 of WildAxe_Dummy_Loc_2 and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_2)
-
Else - Actions
- Countdown Timer - Pause WildAxe_Timer
- Unit - Kill WildAxe_Dummy[1]
- Unit - Kill WildAxe_Dummy[2]
- Unit - Remove WildAxe_Dummy[1] from the game
- Unit - Remove WildAxe_Dummy[2] from the game
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_1)
- Custom script: call RemoveLocation (udg_WildAxe_Dummy_Loc_2)
- Custom script: call RemoveLocation (udg_WildAxe_Caster_Loc)
- Custom script: call RemoveLocation (udg_WildAxe_Target_Loc)
- Unit Group - Remove all units from WildAxe_Group
- Unit Group - Remove all units from WildAxe_ReturnGroup
- Set WildAxe_ReturnDistance_1 = 0.00
- Set WildAxe_ReturnDistance_2 = 0.00
- Set WildAxe_ReturnInterval_1 = 0.00
- Set WildAxe_ReturnInterval_2 = 0.00
- Set WildAxe_Distance = 0.00
- Set WildAxe_Tilt[1] = 1.00
- Set WildAxe_Tilt2 = 10.00
- Set WildAxe_Tilt[3] = 1.00
- Set WildAxe_Interval = 0.00
- Set WildAxe_Counter = 1
- Set WildAxe_Angle = 0.00
- Set WildAxe_RetunAngle_1 = 0.00
- Set WildAxe_RetunAngle_2 = 0.00
- Set WildAxe_Check[1] = 0.00
- Set WildAxe_Check[2] = 0.00
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited: