- Joined
- Oct 28, 2016
- Messages
- 22
Hello, I created a passive ability which creates a bomb after passing of X distance. The problem is leaking. Altough I removed as much leaks as possible, the hero with that ability causes hard lags problems since 20+ min.
Here is the part of trigger which makes the system "after passing X distance":
Events - every 0.03s
Actions:
Set NM_X = (X of NM_point[1])
Set NM_Y = (Y of NM_point[1])
Custom Script: Call RemoveLocation (udg_NM_point[1])
Set NM_point[2] = Point(NM_X, NM_Y)
Set NM_point[1] = (Position of MyHero)
Set NM_dist = (NM_dist + Distance between NM_point[1], NM_point[2])
Custom Script: Call RemoveLocation (udg_NM_point[1])
Whole Triggers: (thanks to Dehua_Darbuya for posting me the English GUI code!)

Thanks for reading
Here is the part of trigger which makes the system "after passing X distance":
Events - every 0.03s
Actions:
Set NM_X = (X of NM_point[1])
Set NM_Y = (Y of NM_point[1])
Custom Script: Call RemoveLocation (udg_NM_point[1])
Set NM_point[2] = Point(NM_X, NM_Y)
Set NM_point[1] = (Position of MyHero)
Set NM_dist = (NM_dist + Distance between NM_point[1], NM_point[2])
Custom Script: Call RemoveLocation (udg_NM_point[1])
Whole Triggers: (thanks to Dehua_Darbuya for posting me the English GUI code!)
-
NM init
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Nova Moves for Paladin 0000 <gen>) Greater than or equal to 1
-
-
Then - Actions
-
Set NM_temploc1 = (Position of Paladin 0000 <gen>)
-
Set NM_temploc2 = (NM_temploc1 offset by (30.00, -20.00))
-
Floating Text - Create floating text that reads IIIII at NM_temploc2 with Z offset 0.00, using font size 5.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Custom script: call RemoveLocation (udg_NM_temploc1)
-
Custom script: call RemoveLocation (udg_NM_temploc2)
-
Set NM_text = (Last created floating text)
-
Floating Text - Hide NM_text for (All players)
-
Floating Text - Show NM_text for (Player group((Owner of Paladin 0000 <gen>)))
-
Set NM_point[1] = (Position of Paladin 0000 <gen>)
-
Set NM_required[1] = 3300.00
-
Set NM_required[2] = 3100.00
-
Set NM_required[3] = 2900.00
-
Set NM_required[4] = 2700.00
-
Set NM_required[5] = 2500.00
-
Trigger - Turn on NM loop <gen>
-
Trigger - Turn on NM textmove <gen>
-
Trigger - Turn on NM explode activate <gen>
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
NM loop
-
Events
-
Time - Every 0.25 seconds of game time
-
-
Conditions
-
Actions
-
Set NM_X = (X of NM_point[1])
-
Set NM_Y = (Y of NM_point[1])
-
Custom script: call RemoveLocation (udg_NM_point [1])
-
Set NM_point[2] = (Point(NM_X, NM_Y))
-
Set NM_point[1] = (Position of Paladin 0000 <gen>)
-
Set NM_dist = (NM_dist + (Distance between NM_point[1] and NM_point[2]))
-
Custom script: call RemoveLocation (udg_NM_point [2])
-
Set NM_temptext = <Empty String>
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NM_dist Greater than or equal to ((NM_required[(Level of Nova Moves for Paladin 0000 <gen>)] / 5.00) x (Real((Integer A))))
-
-
Then - Actions
-
Set NM_temptext = (NM_temptext + |cffFF0000I|r)
-
-
Else - Actions
-
Set NM_temptext = (NM_temptext + I)
-
-
-
-
-
Floating Text - Change text of NM_text to NM_temptext using font size 5.50
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NM_dist Greater than or equal to NM_required[(Level of Nova Moves for Paladin 0000 <gen>)]
-
-
Then - Actions
-
Set NM_dist = 0.00
-
Set NM_temploc1 = (Position of Paladin 0000 <gen>)
-
Unit - Create 1 Rifleman for (Owner of Paladin 0000 <gen>) at NM_temploc1 facing Default building facing degrees
-
Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
-
Unit Group - Add (Last created unit) to NM_dummygroup
-
Unit - Create 1 Peasant for (Owner of Paladin 0000 <gen>) at NM_temploc1 facing Default building facing degrees
-
Custom script: call RemoveLocation (udg_NM_temploc1)
-
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
Animation - Change (Last created unit)'s size to (150.00%, 150.00%, 150.00%) of its original size
-
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
-
-
Else - Actions
-
-
-
-
NM textmove
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Set NM_temploc1 = (Position of Paladin 0000 <gen>)
-
Set NM_temploc2 = (NM_temploc1 offset by (30.00, -20.00))
-
Floating Text - Change the position of NM_text to NM_temploc2 with Z offset 0.00
-
Custom script: call RemoveLocation (udg_NM_temploc1)
-
Custom script: call RemoveLocation (udg_NM_temploc2)
-
-
-
NM explode activate
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
((Attacking unit) is in NM_dummygroup) Equal to True
-
-
Actions
-
Unit - Order (Attacking unit) to Human Mountain King - Thunder Clap
-
Set NM_temploc2 = (Position of (Attacking unit))
-
Set NM_tempgroup = (Units within 175.00 of NM_temploc2 matching (((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) is A structure) Equal to False)))
-
Unit Group - Pick every unit in NM_tempgroup and do (Actions)
-
Loop - Actions
-
Unit - Cause Paladin 0000 <gen> to damage (Picked unit), dealing ((Max life of (Picked unit)) x 0.12) damage of attack type Spells and damage type Normal
-
-
-
Special Effect - Create a special effect at NM_temploc2 using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
-
Custom script: call RemoveLocation (udg_NM_temploc2)
-
Custom script: call DestroyGroup (udg_NM_tempgroup)
-
Wait 0.50 seconds
-
Unit - Remove (Attacking unit) from the game
-
-
Thanks for reading
Last edited: