- Joined
- Jun 1, 2008
- Messages
- 341
Hey these are just triggers for a basic MPI Spell for a map, I have no plans to submit the spell or anything, but i want it simple for my map and at the moment it is.
So if at all posible could someone check over my triggers have a quick look for leaks and perhaps a few suggestions for improved efficiency, as there will be a new "3" 'blast' unitS created aproximately every 0.25 seconds at some points in game and i need as little lag as possible.

So if at all posible could someone check over my triggers have a quick look for leaks and perhaps a few suggestions for improved efficiency, as there will be a new "3" 'blast' unitS created aproximately every 0.25 seconds at some points in game and i need as little lag as possible.
-
Blast Cast
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Blast
-
-
Actions
-
Set TempUnit1 = (Casting unit)
-
Set TempPoint1 = (Position of TempUnit1)
-
Set TempPoint2 = (Target point of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Blast for TempUnit1) Equal to 1
-
-
Then - Actions
-
Set TempInteger = 1
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Blast for TempUnit1) Equal to 2
-
-
Then - Actions
-
Set TempInteger = 0
-
-
Else - Actions
-
Set TempInteger = -1
-
-
-
-
-
Set TempGroup2 = (Units of type Blast (Dark))
-
Set TempGroup3 = (Units of type Blast (Light))
-
Unit Group - Add all units of TempGroup3 to TempGroup2
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in TempGroup2) Equal to 0
-
-
Then - Actions
-
Game - Display to (All players) the text: (String((Number of units in TempGroup2)))
-
Trigger - Turn on Blast Loop <gen>
-
-
Else - Actions
-
-
For each (Integer A) from TempInteger to 1, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of TempUnit1) Equal to Servent Of Darkness
-
-
Then - Actions
-
Unit - Create 1 Blast (Dark) for (Owner of TempUnit1) at TempPoint1 facing ((Angle from TempPoint1 to TempPoint2) + ((Real((Integer A))) x 5.00)) degrees
-
-
Else - Actions
-
Unit - Create 1 Blast (Light) for (Owner of TempUnit1) at TempPoint1 facing ((Angle from TempPoint1 to TempPoint2) + ((Real((Integer A))) x 5.00)) degrees
-
-
-
Set TempUnit2 = (Last created unit)
-
Unit - Turn collision for TempUnit2 Off
-
Unit - Set the custom value of TempUnit2 to (600 + (25 x (Level of TempUnit1)))
-
Unit - Set level of Ability Level for TempUnit2 to (Level of TempUnit1)
-
Unit - Add Storm Crow Form to TempUnit2
-
Unit - Remove Storm Crow Form from TempUnit2
-
Animation - Change TempUnit2 flying height to 70.00 at 0.00
-
-
-
Unit - Order TempUnit1 to Stop
-
Animation - Change TempUnit1's animation speed to 300.00% of its original speed
-
Animation - Queue TempUnit1's attack animation
-
-
-
Blast Loop
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
Set TempGroup1 = (Units of type Blast (Dark))
-
Set TempGroup2 = (Units of type Blast (Light))
-
Unit Group - Add all units of TempGroup2 to TempGroup1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in TempGroup1) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Skip remaining actions
-
-
Else - Actions
-
-
Unit Group - Pick every unit in TempGroup1 and do (Actions)
-
Loop - Actions
-
Set TempUnit1 = (Picked unit)
-
Set TempPoint1 = (Position of TempUnit1)
-
Set TempPoint2 = (TempPoint1 offset by 15.00 towards (Facing of TempUnit1) degrees)
-
Unit - Move TempUnit1 instantly to TempPoint2
-
Unit - Set the custom value of TempUnit1 to ((Custom value of TempUnit1) - 15)
-
Destructible - Pick every destructible in (Region centered at TempPoint2 with size (175.00, 175.00)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked destructible) is alive) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of TempUnit1) Equal to Blast (Dark)
-
-
Then - Actions
-
Special Effect - Create a special effect at TempPoint2 using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
Special Effect - Create a special effect at TempPoint2 using Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Destructible - Set life of (Picked destructible) to ((Current life of (Picked destructible)) - 25.00)
-
Unit - Remove TempUnit1 from the game
-
Skip remaining actions
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Custom value of TempUnit1) Less than or equal to 0
-
(Terrain pathing at TempPoint2 of type Walkability is off) Equal to True
-
-
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of TempUnit1) Equal to Blast (Dark)
-
-
Then - Actions
-
Special Effect - Create a special effect at TempPoint2 using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
Special Effect - Create a special effect at TempPoint2 using Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Unit - Remove TempUnit1 from the game
-
-
Else - Actions
-
Set TempGroup2 = (Units within 50.00 of TempPoint2 matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of TempUnit1)) Equal to True)))
-
Unit Group - Pick every unit in TempGroup2 and do (Actions)
-
Loop - Actions
-
Set TempUnit2 = (Picked unit)
-
Set TempPoint3 = (Position of TempUnit2)
-
Unit - Cause TempUnit1 to damage TempUnit2, dealing (20.00 + (10.00 x (Real((Level of Ability Level for TempUnit1))))) damage of attack type Spells and damage type Normal
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of TempUnit1) Equal to Blast (Dark)
-
-
Then - Actions
-
Special Effect - Create a special effect at TempPoint2 using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
Special Effect - Create a special effect at TempPoint2 using Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Unit - Remove TempUnit1 from the game
-
-
-
-
-
-
-
-