- Joined
- Apr 9, 2004
- Messages
- 502
On the spells i'm making i often find that when some are in effect; the game slows down dramatically and i don't know why? I first figured it was because of leask but i don't know what else to fix.
Here are my 2 problem spells with a bit of JASS custom script in them.
1 this one's the carrier ability i sent out to make; it still doesn't work smoothly when everyone else is in action and i've removed the custom points so i still don't know what to do? here's the code for the carrying portion of the ability.
The triggers supposed to constantly move the unit to a fixed polar location on my hero. I also added in a feature to heal. There'ds also a bit to detect range so that they can reload. anyways it's only while their on the hero that it slows down.
And then there's this one too.
It creates a growing web pattern made out of lightning effects. I have another one to setup the lightning and another to remove it.
Is there a way to keep these from lagging? (i also tried to condense the functions as much as possible (there's still a bit more i can condense but it's pretty much aas compact as i can think of getting it.))
What other things must i clean up in order to fix the extreme slowdown/lag brought on by these abilities?
Here are my 2 problem spells with a bit of JASS custom script in them.
1 this one's the carrier ability i sent out to make; it still doesn't work smoothly when everyone else is in action and i've removed the custom points so i still don't know what to do? here's the code for the carrying portion of the ability.
Code:
Keep sentinel 1 housed
Events
Time - Every 0.01 seconds of game time
Conditions
(Distance between (Position of Mobile Crypt Machine Pilot 0051 <gen>) and (Position of Sentinel[1])) Less than or equal to 140.00
Actions
Unit - Set life of Sentinel[1] to ((Life of Sentinel[1]) + (0.03 x (Real((Level of Manufacture Sentinels for Mobile Crypt Machine Pilot 0051 <gen>)))))
Set SentinelPoint[1] = ((Position of Mobile Crypt Machine Pilot 0051 <gen>) offset by 90.00 towards ((Facing of Mobile Crypt Machine Pilot 0051 <gen>) - 150.00) degrees)
Unit - Move Sentinel[1] instantly to SentinelPoint[1], facing ((Facing of Mobile Crypt Machine Pilot 0051 <gen>) + 180.00) degrees
Custom script: call RemoveLocation(udg_SentinelPoint[1])
The triggers supposed to constantly move the unit to a fixed polar location on my hero. I also added in a feature to heal. There'ds also a bit to detect range so that they can reload. anyways it's only while their on the hero that it slows down.
And then there's this one too.
Code:
Increase Area of effect
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Set WebGrowingVaraible = (WebGrowingVaraible + 0.50)
Unit - Set Level of Slwoing Units in web (Neutral Hostile) for WebBuffer to (Integer(((Real((Integer(WebGrowingVaraible)))) / 10.00)))
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Set UltMainWebPoints[(Integer A)] = (UltWebChannelPoint offset by WebGrowingVaraible towards ((Real((Integer A))) x 45.00) degrees)
Lightning - Move UltWebMain[(Integer A)] UltWebChannelPoint UltMainWebPoints[(Integer A)]
Custom script: call RemoveLocation(udg_UltMainWebPoints[GetForLoopIndexA()])
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Set UltFirstWebPoints[(Integer A)] = (UltWebChannelPoint offset by (WebGrowingVaraible / (1000.00 / 900.00)) towards ((Real((Integer A))) x 45.00) degrees)
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Lightning - Move UltWebfirst[(Integer A)] UltFirstWebPoints[(Integer A)] UltFirstWebPoints[((Integer A) + 1)]
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Custom script: call RemoveLocation(udg_UltFirstWebPoints[GetForLoopIndexA()])
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Set UltSecondWebPoints[(Integer A)] = (UltWebChannelPoint offset by (WebGrowingVaraible / (1000.00 / 600.00)) towards ((Real((Integer A))) x 45.00) degrees)
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Lightning - Move UltWebfirstsecond[(Integer A)] UltSecondWebPoints[(Integer A)] UltSecondWebPoints[((Integer A) + 1)]
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Custom script: call RemoveLocation(udg_UltSecondWebPoints[GetForLoopIndexA()])
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Set UltThirdWebPoints[(Integer A)] = (UltWebChannelPoint offset by (WebGrowingVaraible / (1000.00 / 300.00)) towards ((Real((Integer A))) x 45.00) degrees)
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Lightning - Move UltWebfirstthird[(Integer A)] UltThirdWebPoints[(Integer A)] UltThirdWebPoints[((Integer A) + 1)]
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Custom script: call RemoveLocation(udg_UltThirdWebPoints[GetForLoopIndexA()])
It creates a growing web pattern made out of lightning effects. I have another one to setup the lightning and another to remove it.
Is there a way to keep these from lagging? (i also tried to condense the functions as much as possible (there's still a bit more i can condense but it's pretty much aas compact as i can think of getting it.))
What other things must i clean up in order to fix the extreme slowdown/lag brought on by these abilities?