- Joined
- Jun 27, 2008
- Messages
- 2,557
Hello.
There is a simple spell that cause extreme lags and with every use bigger ones until I can't even cast it. Game is singleplayer. Spell consist of two triggers. Dummies are Locust with SFX model that has negative life regeneration rate and dies after 1 second of summon. SFX do not cause lag. I am not really good at coding etc, so I suppose there is something to do with triggers. Help would be appreciated.
There is a simple spell that cause extreme lags and with every use bigger ones until I can't even cast it. Game is singleplayer. Spell consist of two triggers. Dummies are Locust with SFX model that has negative life regeneration rate and dies after 1 second of summon. SFX do not cause lag. I am not really good at coding etc, so I suppose there is something to do with triggers. Help would be appreciated.
-
Crystalic Impale
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Crystalic Impale
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Mana of Hero) - ((Max mana of Hero) x 0.23)) Less than or equal to 0.00
-
-



Then - Actions
-




Unit - Set mana of Hero to 0.00%
-




Skip remaining actions
-
-



Else - Actions
-




Unit - Set mana of Hero to ((Mana of Hero) - ((Max mana of Hero) x 0.23))
-
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Ability being cast) Equal to Crystalic Impale
-
-



Then - Actions
-




Set HeroFaceCrystal = (Facing of Hero)
-




Set HeroLocationCrystal = (Position of Hero)
-




Set HeroPathCrystal = 30.00
-




Set CrystalOffset = (HeroLocationCrystal offset by HeroPathCrystal towards HeroFaceCrystal degrees)
-




Sound - Play BlizzardLoop1 <gen>
-




Trigger - Turn on Crystalic Impale Loop <gen>
-
-



Else - Actions
-
-
-
-
Crystalic Impale Loop
-

Events
-


Time - Every 0.20 seconds of game time
-
-

Conditions
-

Actions
-


Sound - Stop IceBreak <gen> Immediately
-


Sound - Play IceBreak <gen>
-


Set HeroLocationCrystal = (Position of Hero)
-


Set CrystalOffset = (HeroLocationCrystal offset by HeroPathCrystal towards HeroFaceCrystal degrees)
-


Unit - Create 1 Conjured Crystal for Player 1 (Red) at CrystalOffset facing (Random real number between 0.00 and 360.00) degrees
-


Custom script: set bj_wantDestroyGroup = true
-


Unit Group - Pick every unit in (Units within 175.00 of CrystalOffset) and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Picked unit) Not equal to Hero
-
-





Then - Actions
-






Set CrystalTarget = (Position of (Picked unit))
-






Unit - Create 1 Dummy1 for Player 1 (Red) at CrystalTarget facing Default building facing degrees
-






Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
-






Unit - Cause Hero to damage (Picked unit), dealing ((Mana of Hero) x 0.20) damage of attack type Spells and damage type Normal
-






Sound - Stop IceCrack <gen> Immediately
-






Sound - Play IceCrack <gen>
-
-





Else - Actions
-
-
-
-


Set HeroPathCrystal = (HeroPathCrystal + 100.00)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




HeroPathCrystal Greater than or equal to 1000.00
-
-



Then - Actions
-




Trigger - Turn off (This trigger)
-




Sound - Stop BlizzardLoop1 <gen> After fading
-
-



Else - Actions
-
-


Custom script: call RemoveLocation(udg_HeroLocationCrystal)
-


Custom script: call RemoveLocation(udg_CrystalOffset)
-


Custom script: call RemoveLocation(udg_CrystalTarget)
-
-
Last edited:















