i made this spell, there are ranks, each rank is a single ability, this is all set at map init. when activated causes massive lag. what is the cause? maybe a conflict?
i just added to display the text to know when the trigger is off, and the trigger is turned off, and when that occurs, the lag stops. can someone help me?
-
Spells Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set spell_hb_table = (Last created hashtable)
-
Set spell_hb_ranks[1] = Holy Burn (Rank 1)
-
Set spell_hb_ranks[2] = Holy Burn (Rank 2)
-
Set spell_hb_ranks[3] = Holy Burn (Rank 3)
-
Set spell_hb_ranks[4] = Holy Burn (Rank 4)
-
Set spell_hb_ranks[5] = Holy Burn (Rank 5)
-
Set spell_hb_ranks[6] = Holy Burn (Rank 6)
-
Set spell_hb_ranks[7] = Holy Burn (Rank 7)
-
Set spell_hb_rankcount = 7
-
-
-
Spells Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Actions
-
For each (Integer generalintegers[1]) from 1 to spell_hb_rankcount, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to spell_hb_ranks[generalintegers[1]]
-
-
Then - Actions
-
Set spell_hb_caster = (Triggering unit)
-
Set spell_hb_target = (Target unit of ability being cast)
-
Set spell_hb_casterint = (Intelligence of spell_hb_caster (Include bonuses))
-
Set spell_hb_damage = (20.00 + ((2.00 + (0.75 x (Real(generalintegers[1])))) x (Real(spell_hb_casterint))))
-
Set spell_hb_duration = 5.00
-
Set spell_hb_critchance = (0.08 + (0.02 x (Real(generalintegers[1]))))
-
Hashtable - Save spell_hb_critchance as (Key critchance) of (Key (Target unit of ability being cast)) in spell_hb_table
-
Hashtable - Save spell_hb_duration as (Key duration) of (Key (Target unit of ability being cast)) in spell_hb_table
-
Hashtable - Save spell_hb_damage as (Key damage) of (Key (Target unit of ability being cast)) in spell_hb_table
-
Hashtable - Save Handle Ofspell_hb_caster as (Key caster) of (Key (Target unit of ability being cast)) in spell_hb_table
-
Unit Group - Add spell_hb_target to spell_hb_group
-
Trigger - Turn on Holy Burn Periodic <gen>
-
Floating Text - Create floating text that reads (commands_playercolors[(Player number of (Owner of (Triggering unit)))] + (Holy Burn! + |r)) above spell_hb_caster with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 0.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
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
-
Skip remaining actions
-
-
Else - Actions
-
-
-
-
-
-
Holy Burn Periodic
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in spell_hb_group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Holy Burn ) Equal to True
-
((Picked unit) is alive) Equal to True
-
-
Then - Actions
-
Set spell_hb_duration = (Load (Key duration) of (Key (Picked unit)) from spell_hb_table)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
spell_hb_duration Equal to 1.00
-
spell_hb_duration Equal to 2.00
-
spell_hb_duration Equal to 3.00
-
spell_hb_duration Equal to 4.00
-
spell_hb_duration Equal to 5.00
-
-
-
-
Then - Actions
-
Set spell_hb_caster = (Load (Key caster) of (Key (Picked unit)) in spell_hb_table)
-
Set spell_hb_target = (Picked unit)
-
Set spell_hb_damage = (Load (Key damage) of (Key (Picked unit)) from spell_hb_table)
-
Set spell_hb_tempdamage = (spell_hb_damage / 5.00)
-
Unit - Cause spell_hb_caster to damage spell_hb_target, dealing spell_hb_tempdamage damage of attack type Spells and damage type Normal
-
Floating Text - Create floating text that reads (|cffffff00 + ((String((Integer(spell_hb_tempdamage)))) + |r)) above spell_hb_target with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
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
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
spell_hb_duration Equal to 0.00
-
-
Then - Actions
-
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set spell_hb_critchance = (Load (Key critchance) of (Key (Picked unit)) from spell_hb_table)
-
Set spell_hb_duration = (spell_hb_duration - 0.05)
-
Set spell_hb_caster = (Load (Key caster) of (Key (Picked unit)) in spell_hb_table)
-
Set spell_hb_target = (Picked unit)
-
Set spell_hb_damage = (Load (Key damage) of (Key (Picked unit)) from spell_hb_table)
-
Set spell_hb_tempdamage = (spell_hb_damage / 2.50)
-
Set spell_hb_critmultiplier = 2.50
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random real number between 0.00 and 1.00) Less than or equal to spell_hb_critchance
-
-
Then - Actions
-
Set spell_hb_tempdamage = (spell_hb_tempdamage x spell_hb_critmultiplier)
-
Unit - Cause spell_hb_caster to damage spell_hb_target, dealing spell_hb_tempdamage damage of attack type Spells and damage type Normal
-
Floating Text - Create floating text that reads (|cffffff00 + ((String((Integer(spell_hb_tempdamage)))) + ! |r)) above spell_hb_target with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
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
-
-
Else - Actions
-
Unit - Cause spell_hb_caster to damage spell_hb_target, dealing spell_hb_tempdamage damage of attack type Spells and damage type Normal
-
Floating Text - Create floating text that reads (|cffffff00 + ((String((Integer(spell_hb_tempdamage)))) + |r)) above spell_hb_target with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
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
-
-
-
Unit Group - Remove (Picked unit) from spell_hb_group
-
Unit - Remove Holy Burn buff from (Picked unit)
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in spell_hb_table
-
-
Else - Actions
-
-
-
-
Set spell_hb_duration = (spell_hb_duration - 0.05)
-
Hashtable - Save spell_hb_duration as (Key duration) of (Key (Picked unit)) in spell_hb_table
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from spell_hb_group
-
Unit - Remove Holy Burn buff from (Picked unit)
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in spell_hb_table
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in spell_hb_group) Equal to 0
-
-
Then - Actions
-
Game - Display to (All players) the text: hb periodic off
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-