- Joined
- Feb 22, 2012
- Messages
- 74
I am wondering if my spell is executed inefficiently, based on GUI standards.
It does work as intended, just looking for some optimizations.
Spell:
My biggest concern is the fact that this spell has 3 triggers, and 2 of them are periodic.
Here are the triggers
On Cast:
It does work as intended, just looking for some optimizations.
Spell:
Flame Spear
Launches a projectile that explodes on contact with an enemy, or after reaching maximum range. The explosion deals 20-60 elemental damage to nearby enemies. Maximum damage is caused at greater range.
Affected enemies are ignited, causing them to suffer and additional 50% of the impact damage over 5 seconds.
Range: 2400
Radius: 260
Cooldown: 2
My biggest concern is the fact that this spell has 3 triggers, and 2 of them are periodic.
Here are the triggers
On Cast:
-
Flame Spear Cast
-
Events
-
Conditions
-
Actions
-
Game - Display to (All players) the text: Cast Flame Spear
-
Set tempLoc[0] = (Position of (Triggering unit))
-
Set tempLoc[1] = (Target point of ability being cast)
-
Set tempReal[0] = (Angle from tempLoc[0] to tempLoc[1])
-
Custom script: call RemoveLocation(udg_tempLoc[1])
-
Set tempReal[1] = (sorFlameSpearSMin x intervalAbilityProjectile)
-
Set tempLoc[2] = (tempLoc[0] offset by tempReal[1] towards tempReal[0] degrees)
-
Custom script: call RemoveLocation(udg_tempLoc[0])
-
Unit - Create 1 sorFlameSpearMissle for (Owner of (Triggering unit)) at tempLoc[2] facing tempReal[0] degrees
-
Custom script: call RemoveLocation(udg_tempLoc[2])
-
Hashtable - Save Handle Of(Triggering unit) as (Key source) of (Key (Last created unit)) in sorFlameSpearHash
-
Hashtable - Save sorFlameSpearDMin as (Key damage) of (Key (Last created unit)) in sorFlameSpearHash
-
Hashtable - Save sorFlameSpearDMin as (Key mindamage) of (Key (Last created unit)) in sorFlameSpearHash
-
Hashtable - Save sorFlameSpearDMax as (Key maxdamage) of (Key (Last created unit)) in sorFlameSpearHash
-
Hashtable - Save (sorFlameSpearSMin x intervalAbilityProjectile) as (Key speed) of (Key (Last created unit)) in sorFlameSpearHash
-
Hashtable - Save sorFlameSpearSInc as (Key speedinc) of (Key (Last created unit)) in sorFlameSpearHash
-
Hashtable - Save 0.00 as (Key distance) of (Key (Last created unit)) in sorFlameSpearHash
-
Hashtable - Save tempReal[0] as (Key angle) of (Key (Last created unit)) in sorFlameSpearHash
-
Unit Group - Add (Last created unit) to sorFlameSpearMGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Flame Spear Missle <gen> is on) Equal to False
-
-
Then - Actions
-
Game - Display to (All players) the text: Flame Spear - On
-
Trigger - Turn on Flame Spear Missle <gen>
-
-
Else - Actions
-
-
-
-
Flame Spear Missle
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(sorFlameSpearMGroup is empty) Equal to True
-
-
Then - Actions
-
Game - Display to (All players) the text: Flame Spear - Off
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Unit Group - Pick every unit in sorFlameSpearMGroup and do (Actions)
-
Loop - Actions
-
Set tempReal[0] = (Load (Key distance) of (Key (Picked unit)) from sorFlameSpearHash)
-
Set tempLoc[0] = (Position of (Picked unit))
-
Set tempGroup = (Units within sorFlameSpearCollision of tempLoc[0] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
tempReal[0] Greater than or equal to sorFlameSpearRange
-
(tempGroup is empty) Equal to False
-
-
-
-
Then - Actions
-
Custom script: call DestroyGroup(udg_tempGroup)
-
Set tempInt[0] = (Key (Picked unit))
-
Set tempReal[0] = (Load (Key damage) of tempInt[0] from sorFlameSpearHash)
-
Floating Text - Create floating text that reads ((String((Integer(tempReal[0])))) + !) at tempLoc[0] with Z offset 100.00, using font size 22.00, color (100.00%, 33.00%, 0.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 40.00 towards 90.00 degrees
-
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
-
Floating Text - Change (Last created floating text): Disable permanence
-
Set tempGroup = (Units within sorFlameSpearRadius of tempLoc[0] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (Load (Key source) of tempInt[0] in sorFlameSpea
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Unit - Cause (Load (Key source) of tempInt[0] in sorFlameSpearHash) to damage (Picked unit), dealing tempReal[0] damage of attack type ATElemental and damage type DTElemental
-
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set tempLoc[1] = (Position of (Picked unit))
-
Unit - Create 1 EffectDummy for (Owner of (Load (Key source) of tempInt[0] in sorFlameSpearHash)) at tempLoc[1] facing Default building facing degrees
-
Custom script: call RemoveLocation(udg_tempLoc[1])
-
Hashtable - Save Handle Of(Load (Key source) of tempInt[0] in sorFlameSpearHash) as (Key source) of (Key (Last created unit)) in sorIgniteHash
-
Hashtable - Save Handle Of(Picked unit) as (Key target) of (Key (Last created unit)) in sorIgniteHash
-
Hashtable - Save (((tempReal[0] x sorIgniteFactor) / sorIgniteDuration) x intervalAbilityEffects) as (Key damage) of (Key (Last created unit)) in sorIgniteHash
-
Hashtable - Save sorIgniteDuration as (Key duration) of (Key (Last created unit)) in sorIgniteHash
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\FlameStrike\FlameStrikeDamageTarget.mdl
-
Hashtable - Save Handle Of(Last created special effect) as (Key effect0) of (Key (Last created unit)) in sorIgniteHash
-
Unit Group - Add (Last created unit) to sorIgniteGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ignite Effects <gen> is on) Equal to False
-
-
Then - Actions
-
Game - Display to (All players) the text: Ignite - On
-
Trigger - Turn on Ignite Effects <gen>
-
-
Else - Actions
-
-
Unit Group - Remove (Picked unit) from tempGroup
-
-
-
Custom script: call DestroyGroup(udg_tempGroup)
-
Unit Group - Remove (Picked unit) from sorFlameSpearMGroup
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in sorFlameSpearHash
-
Unit - Kill (Picked unit)
-
-
Else - Actions
-
Custom script: call DestroyGroup(udg_tempGroup)
-
Set tempLoc[1] = (tempLoc[0] offset by (Load (Key speed) of (Key (Picked unit)) from sorFlameSpearHash) towards (Load (Key angle) of (Key (Picked unit)) from sorFlameSpearHash) degrees)
-
Unit - Move (Picked unit) instantly to tempLoc[1]
-
Custom script: call RemoveLocation(udg_tempLoc[1])
-
Hashtable - Save ((Load (Key distance) of (Key (Picked unit)) from sorFlameSpearHash) + (Load (Key speed) of (Key (Picked unit)) from sorFlameSpearHash)) as (Key distance) of (Key (Picked unit)) in sorFlameSpearHash
-
Hashtable - Save ((Load (Key mindamage) of (Key (Picked unit)) from sorFlameSpearHash) + (((Load (Key maxdamage) of (Key (Picked unit)) from sorFlameSpearHash) - (Load (Key mindamage) of (Key (Picked unit)) from sorFlameSpearHash)) x ((Load (Key distance) of (Key (Picked unit as (Key damage) of (Key (Picked unit)) in sorFlameSpearHash
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Load (Key damage) of (Key (Picked unit)) from sorFlameSpearHash) Greater than (Load (Key maxdamage) of (Key (Picked unit)) from sorFlameSpearHash)
-
-
Then - Actions
-
Hashtable - Save (Load (Key maxdamage) of (Key (Picked unit)) from sorFlameSpearHash) as (Key damage) of (Key (Picked unit)) in sorFlameSpearHash
-
-
Else - Actions
-
-
Hashtable - Save ((Load (Key speed) of (Key (Picked unit)) from sorFlameSpearHash) + (Load (Key speedinc) of (Key (Picked unit)) from sorFlameSpearHash)) as (Key speed) of (Key (Picked unit)) in sorFlameSpearHash
-
-
-
Custom script: call RemoveLocation(udg_tempLoc[0])
-
-
-
-
-
-
-
Ignite Effects
-
Events
-
Time - Every 0.20 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(sorIgniteGroup is empty) Equal to True
-
-
Then - Actions
-
Game - Display to (All players) the text: Ignite - Off
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Unit Group - Pick every unit in sorIgniteGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Load (Key duration) of (Key (Picked unit)) from sorIgniteHash) Less than or equal to 0.00
-
((Load (Key target) of (Key (Picked unit)) in sorIgniteHash) is alive) Equal to False
-
-
-
-
Then - Actions
-
Special Effect - Destroy (Load (Key effect0) of (Key (Picked unit)) in sorIgniteHash)
-
Unit Group - Remove (Picked unit) from sorIgniteGroup
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in sorIgniteHash
-
Unit - Remove (Picked unit) from the game
-
-
Else - Actions
-
Set tempUnit[0] = (Load (Key source) of (Key (Picked unit)) in sorIgniteHash)
-
Unit - Cause tempUnit[0] to damage (Load (Key target) of (Key (Picked unit)) in sorIgniteHash), dealing (Load (Key damage) of (Key (Picked unit)) from sorIgniteHash) damage of attack type ATElemental and damage type DTElemental
-
Custom script: set udg_tempUnit[0] = null
-
Hashtable - Save ((Load (Key duration) of (Key (Picked unit)) from sorIgniteHash) - intervalAbilityEffects) as (Key duration) of (Key (Picked unit)) in sorIgniteHash
-
-
-
-
-
-
-
-