Hey folks
I am currently working with gui spells - i downloaded some spell packs and read some tutorials (some about memory leaks, too
)
and created this Pyroblast spell:
(Thanks to Rmx for his spell pack here)
I checked it several times with LeakCheck v3.1 and everything seemed to be okay..
But when i trigger the spell..after say 10 times the game begins to lag... after another 10 times it is nearly unplayable
I tried what happens if i test my map and do nothing special or use other spells.. Everything stays normal
Looks like something is wrong with that trigger and I don't know what
Any ideas or tips are welcome
greetings Holzkopf
I am currently working with gui spells - i downloaded some spell packs and read some tutorials (some about memory leaks, too

and created this Pyroblast spell:
(Thanks to Rmx for his spell pack here)
-
Pyroblast
-
Events
-
Unit - A unit Starts the effect of an ability (Bad)
-
-
Conditions
-
(Ability being cast) Equal to Pyro (dummy)
-
-
Actions
-
Set S_KAEL_PYRO_Caster[1] = (Casting unit)
-
Set S_KAEL_PYRO_points[1] = (Position of S_KAEL_PYRO_Caster[1])
-
Set S_KAEL_PYRO_points[2] = (Target point of ability being cast)
-
Unit - Create 1 Dummy Unit {Blast for (Owner of S_KAEL_PYRO_Caster[1]) at (S_KAEL_PYRO_points[1] offset by 50.00 towards (Angle from S_KAEL_PYRO_points[1] to S_KAEL_PYRO_points[2]) degrees) facing (Facing of S_KAEL_PYRO_Caster[1]) degrees
-
Set S_KAEL_PYRO_geschoss = (Last created unit)
-
Unit - Turn collision for S_KAEL_PYRO_geschoss Off
-
Set Real[29] = 10.00
-
Trigger - Turn on Pyroblast Loop <gen>
-
-
-
Pyroblast Loop
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Set Temp_Point1[1] = (Position of S_KAEL_PYRO_geschoss)
-
Set S_KAEL_PYRO_points[3] = (Position of S_KAEL_PYRO_geschoss)
-
Set S_KAEL_PYRO_points[4] = (S_KAEL_PYRO_points[3] offset by 30.00 towards (Angle from S_KAEL_PYRO_points[1] to S_KAEL_PYRO_points[2]) degrees)
-
Set S_KAEL_PYRO_Group = (Units within 130.00 of S_KAEL_PYRO_points[3] matching (((Owner of (Matching unit)) Not equal to (Owner of S_KAEL_PYRO_Caster[1])) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in S_KAEL_PYRO_Blast) Equal to False))))
-
Unit - Move S_KAEL_PYRO_geschoss instantly to S_KAEL_PYRO_points[4]
-
Custom script: call DestroyGroup(udg_S_KAEL_PYRO_Group)
-
Custom script: call RemoveLocation(udg_S_KAEL_PYRO_points[3])
-
Custom script: call RemoveLocation(udg_S_KAEL_PYRO_points[4])
-
Set Real[29] = (Real[29] + 30.00)
-
-------- DAMAGE --------
-
Set S_KAEL_PYRO_Targets = (Units within 200.00 of Temp_Point1[1] matching (((Matching unit) belongs to an enemy of (Owner of S_KAEL_PYRO_Caster[1])) Equal to True))
-
Unit Group - Pick every unit in S_KAEL_PYRO_Targets and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Pyro (dummy) for S_KAEL_PYRO_Caster[1]) Equal to 1
-
-
Then - Actions
-
Unit - Cause S_KAEL_PYRO_Caster[1] to damage (Picked unit), dealing 3.30 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Pyro (dummy) for S_KAEL_PYRO_Caster[1]) Equal to 2
-
-
Then - Actions
-
Unit - Cause S_KAEL_PYRO_Caster[1] to damage (Picked unit), dealing 5.00 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Pyro (dummy) for S_KAEL_PYRO_Caster[1]) Equal to 3
-
-
Then - Actions
-
Unit - Cause S_KAEL_PYRO_Caster[1] to damage (Picked unit), dealing 7.50 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Pyro (dummy) for S_KAEL_PYRO_Caster[1]) Equal to 4
-
-
Then - Actions
-
Unit - Cause S_KAEL_PYRO_Caster[1] to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
-
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Real[29] Greater than or equal to 1200.00
-
-
Then - Actions
-
Unit - Add a 0.10 second Generic expiration timer to S_KAEL_PYRO_geschoss
-
Custom script: call RemoveLocation(udg_S_KAEL_PYRO_points[1])
-
Custom script: call RemoveLocation(udg_Temp_Point1[1])
-
Custom script: call RemoveLocation(udg_S_KAEL_PYRO_points[2])
-
Set Real[29] = 0.00
-
Set S_KAEL_PYRO_Caster[1] = No unit
-
Set S_KAEL_PYRO_geschoss = No unit
-
Unit Group - Remove all units from S_KAEL_PYRO_Blast
-
Unit Group - Remove all units from S_KAEL_PYRO_Group
-
Unit Group - Remove all units from S_KAEL_PYRO_Targets
-
Custom script: call DestroyGroup(udg_S_KAEL_PYRO_Targets)
-
Trigger - Turn off Pyroblast Loop <gen>
-
-
Else - Actions
-
-
-
I checked it several times with LeakCheck v3.1 and everything seemed to be okay..
But when i trigger the spell..after say 10 times the game begins to lag... after another 10 times it is nearly unplayable
I tried what happens if i test my map and do nothing special or use other spells.. Everything stays normal
Looks like something is wrong with that trigger and I don't know what

Any ideas or tips are welcome
greetings Holzkopf