Kusanagi Kuro
Hosted Project: SC
- Joined
- Mar 11, 2012
- Messages
- 708
Hi everyone. I have just created a new spell. It only have 1 trigger and not really complicated. However, it caused a massive lag for a short period after casting the spell. How can I reduce it? Here is the trigger:
-
Skeletal Servant
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Skeletal Servant
-
-
Actions
-
Set Skeletal_Base = ((Intelligence of (Triggering unit) (Include bonuses)) - 1)
-
Set Skeletal_DamageHundreds = (Skeletal_Base / 100)
-
Set Skeletal_DamageTens = ((Skeletal_Base mod 100) / 10)
-
Set Skeletal_DamageUnits = (Skeletal_Base mod 10)
-
Set Skeletal_Base = (Agility of (Triggering unit) (Include bonuses))
-
Set Skeletal_ArmorTens = (Skeletal_Base / 100)
-
Set Skeletal_ArmorUnits = ((Skeletal_Base mod 100) / 10)
-
Set tempPoint = (Position of (Triggering unit))
-
Set tempPoint2 = (tempPoint offset by 150.00 towards (Facing of (Triggering unit)) degrees)
-
Set Skeletal_Side = (75.00 + (25.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
-
Unit - Create 1 Skeletal Servant for (Owner of (Triggering unit)) at tempPoint2 facing (Facing of (Triggering unit)) degrees
-
Animation - Change (Last created unit)'s size to (Skeletal_Side%, Skeletal_Side%, Skeletal_Side%) of its original size
-
Custom script: call RemoveLocation(udg_tempPoint)
-
Custom script: call RemoveLocation(udg_tempPoint2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Skeletal_ArmorTens Greater than 0
-
-
Then - Actions
-
Unit - Add Skeletal Servant Armor (10) to (Last created unit)
-
Unit - Set level of Skeletal Servant Armor (10) for (Last created unit) to Skeletal_ArmorTens
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Skeletal_ArmorUnits Greater than 0
-
-
Then - Actions
-
Unit - Add Skeletal Servant Armor (1) to (Last created unit)
-
Unit - Set level of Skeletal Servant Armor (1) for (Last created unit) to Skeletal_ArmorUnits
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Skeletal_DamageHundreds Greater than 0
-
-
Then - Actions
-
Unit - Add Skeletal Servant Damage (100) to (Last created unit)
-
Unit - Set level of Skeletal Servant Damage (100) for (Last created unit) to Skeletal_DamageHundreds
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Skeletal_DamageTens Greater than 0
-
-
Then - Actions
-
Unit - Add Skeletal Servant Damage (10) to (Last created unit)
-
Unit - Set level of Skeletal Servant Damage (10) for (Last created unit) to Skeletal_DamageTens
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Skeletal_DamageUnits Greater than 0
-
-
Then - Actions
-
Unit - Add Skeletal Servant Damage (1) to (Last created unit)
-
Unit - Set level of Skeletal Servant Damage (1) for (Last created unit) to Skeletal_DamageUnits
-
-
Else - Actions
-
-
-