IceWarrior98
New Member
- Reaction score
- 12
Nevermind, the major lag caused by my ability was caused by the abilities duration being 6 seconds (which is why the lag always lasted a few seconds only) and by making it 0.01 (because I fear 0 will make it forever) I have fixed it and the spell no longer causes lag.
Me again, this time i'm having a problem with leaks. I've made my first custom trigger enhanced ability but i'm having a major leak problem and I can't seem to solve it. The Leak checker tells me to add this
but the editor wont allow the ability to stay enabled once that is added.
Here is the full trigger:
I'm certain that whatever is causing the problem is simple and only unseen to my blind eye but i'd appreaciate your help.
And I think i'll start tossing out +reps since so many people are helping me here.
EDIT: Also the lag only seems to come after the effects are destroyed (sometimes as they are being used) but usually after everything is done and the damage has been dealt and doesn't happen when I use it on a small group of units (say, 4 or less).
UPDATED CODE:
Me again, this time i'm having a problem with leaks. I've made my first custom trigger enhanced ability but i'm having a major leak problem and I can't seem to solve it. The Leak checker tells me to add this
Code:
Custom script: call DestroyGroup (udg_AT)
Here is the full trigger:
Code:
Arcane Divinity
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Arcane Divinity
Actions
Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Other\Charm\CharmTarget.mdl
Special Effect - Destroy (Last created special effect)
Set ag[1] = (Units within 300.00 of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A ground unit) Equal to True)))
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 300.00 at (Target point of ability being cast), dealing 100.00 damage of attack type Magic and damage type Death
Unit Group - Pick every unit in ag[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Number of units in ag[1]) Less than or equal to 1
Then - Actions
Unit Group - Pick every unit in ag[1] and do (Actions)
Loop - Actions
Set AT = (Picked unit)
Set AL = (Position of AT)
Special Effect - Create a special effect at (Position of AT) using war3mapImported\doombolttarget.mdx
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_AL)
Unit - Cause (Triggering unit) to damage AT, dealing (50.00 x (Real((Level of Arcane Divinity for (Triggering unit))))) damage of attack type Magic and damage type Death
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Number of units in ag[1]) Greater than or equal to 2
Then - Actions
Unit Group - Pick every unit in ag[1] and do (Actions)
Loop - Actions
Set AT = (Picked unit)
Set AL = (Position of AT)
Special Effect - Create a special effect at (Position of AT) using war3mapImported\doombolttarget.mdx
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_AL)
Unit - Cause (Triggering unit) to damage AT, dealing (50.00 x ((Real((Level of Arcane Divinity for (Triggering unit)))) / (Real((Number of units in ag[1]))))) damage of attack type Magic and damage type Death
Else - Actions
Do nothing
Custom script: call DestroyGroup (udg_AT)
I'm certain that whatever is causing the problem is simple and only unseen to my blind eye but i'd appreaciate your help.
And I think i'll start tossing out +reps since so many people are helping me here.
EDIT: Also the lag only seems to come after the effects are destroyed (sometimes as they are being used) but usually after everything is done and the damage has been dealt and doesn't happen when I use it on a small group of units (say, 4 or less).
UPDATED CODE:
Code:
Arcane Divinity
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Arcane Divinity
Actions
Set ep = (Target point of ability being cast)
Special Effect - Create a special effect at ep using Abilities\Spells\Other\Charm\CharmTarget.mdl
Special Effect - Destroy (Last created special effect)
Set ag[1] = (Units within 300.00 of ep matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A ground unit) Equal to True)))
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 300.00 at ep, dealing 100.00 damage of attack type Magic and damage type Fire
Custom script: call RemoveLocation (udg_ep)
Unit Group - Pick every unit in ag[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in ag[1]) Equal to 1
Then - Actions
Unit Group - Pick every unit in ag[1] and do (Actions)
Loop - Actions
Set AT = (Picked unit)
Custom script: call DestroyGroup(udg_ag[1])
Special Effect - Create a special effect at (Position of AT) using war3mapImported\doombolttarget.mdx
Special Effect - Destroy (Last created special effect)
Unit - Cause (Triggering unit) to damage AT, dealing (50.00 x (Real((Level of Arcane Divinity for (Triggering unit))))) damage of attack type Magic and damage type Fire
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in ag[1]) Greater than or equal to 2
Then - Actions
Unit Group - Pick every unit in ag[1] and do (Actions)
Loop - Actions
Set AT = (Picked unit)
Custom script: call DestroyGroup(udg_ag[1])
Special Effect - Create a special effect at (Position of AT) using war3mapImported\doombolttarget.mdx
Special Effect - Destroy (Last created special effect)
Unit - Cause (Triggering unit) to damage AT, dealing (50.00 x ((Real((Level of Arcane Divinity for (Triggering unit)))) / (Real((Number of units in ag[1]))))) damage of attack type Magic and damage type Fire
Else - Actions