Okay, I'm making tons of triggered spells for my map. Many of these triggers use the "Unit - Damage Target/Area, and other special effects and such. Here's one of the triggers:
Ability Shield Bash
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shield Bash
Actions
Set TempPlayerNumber = (Player number of (Owner of (Casting unit)))
Set TempCaster[TempPlayerNumber] = (Casting unit)
Set TempSpellPoint2 = (Position of (Target unit of ability being cast))
Set TempSpellPoint = (TempSpellPoint2 offset by 150.00 towards (Facing of (Casting unit)) degrees)
Set Spell_Damage = ((Random integer number between 10 and 20) x (((Strength of (Casting unit) (Include bonuses)) / 100) + 1))
Animation - Change TempCaster[TempPlayerNumber]'s animation speed to 200.00% of its original speed
Unit - Cause TempCaster[TempPlayerNumber] to damage (Target unit of ability being cast), dealing (Real(Spell_Damage)) damage of attack type Normal and damage type Normal
Unit - Move (Target unit of ability being cast) instantly to TempSpellPoint
Floating Text - Create floating text that reads (String(Spell_Damage)) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
Animation - Change TempCaster[TempPlayerNumber]'s animation speed to 100.00% of its original speed
Custom script: call RemoveLocation( udg_TempSpellPoint )
Custom script: call RemoveLocation( udg_TempSpellPoint2 )
Basically, I want to know if I should make all the variables in these triggers have arrays that correspond to the player number of the casting unit. I'm not sure, but I think that if two heroes use these abilities some confusion might happen and spells not work the right way.
Thanks in advance.
Ability Shield Bash
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shield Bash
Actions
Set TempPlayerNumber = (Player number of (Owner of (Casting unit)))
Set TempCaster[TempPlayerNumber] = (Casting unit)
Set TempSpellPoint2 = (Position of (Target unit of ability being cast))
Set TempSpellPoint = (TempSpellPoint2 offset by 150.00 towards (Facing of (Casting unit)) degrees)
Set Spell_Damage = ((Random integer number between 10 and 20) x (((Strength of (Casting unit) (Include bonuses)) / 100) + 1))
Animation - Change TempCaster[TempPlayerNumber]'s animation speed to 200.00% of its original speed
Unit - Cause TempCaster[TempPlayerNumber] to damage (Target unit of ability being cast), dealing (Real(Spell_Damage)) damage of attack type Normal and damage type Normal
Unit - Move (Target unit of ability being cast) instantly to TempSpellPoint
Floating Text - Create floating text that reads (String(Spell_Damage)) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
Animation - Change TempCaster[TempPlayerNumber]'s animation speed to 100.00% of its original speed
Custom script: call RemoveLocation( udg_TempSpellPoint )
Custom script: call RemoveLocation( udg_TempSpellPoint2 )
Basically, I want to know if I should make all the variables in these triggers have arrays that correspond to the player number of the casting unit. I'm not sure, but I think that if two heroes use these abilities some confusion might happen and spells not work the right way.
Thanks in advance.