1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  3. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  4. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  5. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  6. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  7. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Comradeship v1.03.w3x
Variables
Comradeship
Comradeship Preload
Comradeship Main
Comradeship Loop
Documentation
Documentation
Changelog
Credits
Initialization
Map Intialization
Reset
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
CO_CenterLoc location Yes
CO_Debug group No
CO_DmgLevelDetermining integer Yes
CO_DmgLevelIteger integer Yes
CO_EffectOffsetCounter real Yes
CO_Index integer Yes
CO_MaxDistance real Yes
CO_Off boolean Yes
CO_PolProj1 location Yes
CO_PolProj2 location Yes
CO_PolProj3 location Yes
CO_PolProj4 location Yes
CO_PolProj5 location Yes
CO_PolProj6 location Yes
CO_SFXAlgeo real Yes
CO_SFXDummy1 unit Yes
CO_SFXDummy2 unit Yes
CO_SFXDummy3 unit Yes
CO_SFXDummy4 unit Yes
CO_SFXDummy5 unit Yes
CO_SFXDummy6 unit Yes
CO_SFXDummy7 unit Yes
CO_SFXDummy8 unit Yes
CO_SFXDummy9 unit Yes
CO_SFXSpeed real Yes
CO_SFXTarg1 effect Yes
CO_SFXTarg2 effect Yes
CO_SFXTrig1 effect Yes
CO_SFXTrig2 effect Yes
CO_SpellLastingTime real Yes
CO_TargUnit unit Yes
CO_TargUnitLoc location Yes
CO_TargUnitX real Yes
CO_TargUnitY real Yes
CO_TrigUnit unit Yes
CO_TrigUnitLoc location Yes
CO_TrigUnitX real Yes
CO_TrigUnitY real Yes
CO_WaitCounter real Yes
Comradeship Preload
  Events
    Map initialization
  Conditions
  Actions
    Custom script: call DestroyGroup(udg_CO_Debug)
    Custom script: set udg_CO_Debug = null
    Game - Preload Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl (anyfile)
    Game - Preload Abilities\Weapons\IllidanMissile\IllidanMissile.mdl (anyfile)
    Game - Preload Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl (anyfile)
    Set VariableSet CO_CenterLoc[0] = (Center of (Playable map area))
    -------- SFXDummy1_CO --------
    Unit - Create 1.SFXDummy1_CO for Player 1 (Red) at CO_CenterLoc[0] facing Default building facing degrees
    Unit - Remove (Last created unit) from the game
    -------- SFXDummy2_CO --------
    Unit - Create 1.SFXDummy2_CO for Player 1 (Red) at CO_CenterLoc[0] facing Default building facing degrees
    Unit - Remove (Last created unit) from the game
    -------- SFXDummy3_CO --------
    Unit - Create 1.SFXDummy3_CO for Player 1 (Red) at CO_CenterLoc[0] facing Default building facing degrees
    Unit - Remove (Last created unit) from the game
    Special Effect - Create a special effect at CO_CenterLoc[0] using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
    Special Effect - Destroy (Last created special effect)
    Special Effect - Create a special effect at CO_CenterLoc[0] using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
    Special Effect - Destroy (Last created special effect)
    Special Effect - Create a special effect at CO_CenterLoc[0] using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation(udg_CO_CenterLoc[0])
Comradeship Main
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Comradeship
  Actions
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Basic Index Check --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        CO_Index[1] Equal to 0
      Then - Actions
        Trigger - Turn on Comradeship_Loop <gen>
      Else - Actions
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Indexing --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Set VariableSet CO_Index[1] = (CO_Index[1] + 1)
    Set VariableSet CO_Index[2] = (CO_Index[2] + 1)
    Set VariableSet CO_Off[CO_Index[2]] = True
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- These are some variables for the user to adjust --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Defines the maximum range at which the spell has an effect --------
    Set VariableSet CO_MaxDistance[CO_Index[2]] = 1000.00
    -------- Defines the time that the spell lasts --------
    Set VariableSet CO_SpellLastingTime[CO_Index[2]] = 30.00
    -------- Defines the motion speed of the special effects --------
    Set VariableSet CO_SFXSpeed[CO_Index[2]] = 7.00
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Sets Triggering and Targetting unit into variables --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Set VariableSet CO_TrigUnit[CO_Index[2]] = (Triggering unit)
    Set VariableSet CO_TargUnit[CO_Index[2]] = (Target unit of ability being cast)
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Creating Debug group --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Custom script: if udg_CO_Debug == null then
    Custom script: set udg_CO_Debug = CreateGroup()
    Custom script: endif
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Adding the damage to both units --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (CO_TargUnit[CO_Index[2]] is in CO_Debug.) Equal to False
        (CO_TrigUnit[CO_Index[2]] is in CO_Debug.) Equal to False
      Then - Actions
        Unit Group - Add CO_TrigUnit[CO_Index[2]] to CO_Debug
        Unit Group - Add CO_TargUnit[CO_Index[2]] to CO_Debug
        Unit - Add Comradeship Damage to CO_TrigUnit[CO_Index[2]]
        Unit - Add Comradeship Damage to CO_TargUnit[CO_Index[2]]
      Else - Actions
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Adding Special Effects to the weapons of the units --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Special Effect - Create a special effect attached to the weapon (attachpoint) of (Triggering unit) using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
    Set VariableSet CO_SFXTrig1[CO_Index[2]] = (Last created special effect)
    Special Effect - Create a special effect attached to the weapon (attachpoint) of (Triggering unit) using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
    Set VariableSet CO_SFXTrig2[CO_Index[2]] = (Last created special effect)
    Special Effect - Create a special effect attached to the weapon (attachpoint) of (Target unit of ability being cast) using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
    Set VariableSet CO_SFXTarg1[CO_Index[2]] = (Last created special effect)
    Special Effect - Create a special effect attached to the weapon (attachpoint) of (Target unit of ability being cast) using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
    Set VariableSet CO_SFXTarg2[CO_Index[2]] = (Last created special effect)
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- These variables set the positions of both, the Triggering Unit and the Target Unit --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Set VariableSet CO_TrigUnitLoc[CO_Index[2]] = (Position of CO_TrigUnit[CO_Index[2]])
    Set VariableSet CO_TargUnitLoc[CO_Index[2]] = (Position of CO_TargUnit[CO_Index[2]])
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Sets the X's and Y's of the positions of both units --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Set VariableSet CO_TrigUnitX[CO_Index[2]] = (X of CO_TrigUnitLoc[CO_Index[2]])
    Set VariableSet CO_TrigUnitY[CO_Index[2]] = (Y of CO_TrigUnitLoc[CO_Index[2]])
    Set VariableSet CO_TargUnitX[CO_Index[2]] = (X of CO_TargUnitLoc[CO_Index[2]])
    Set VariableSet CO_TargUnitY[CO_Index[2]] = (Y of CO_TargUnitLoc[CO_Index[2]])
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Simple "vector-midpoint" formula --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Set VariableSet CO_CenterLoc[CO_Index[2]] = (Point(((CO_TrigUnitX[CO_Index[2]] + CO_TargUnitX[CO_Index[2]]) / 2.00), ((CO_TrigUnitY[CO_Index[2]] + CO_TargUnitY[CO_Index[2]]) / 2.00)))
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Creates special effect units (loop is not used in order to set each to a differet, yet indexed, variable) --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- SFXDummy1_CO --------
    Unit - Create 1.SFXDummy1_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 150.00 degrees
    Set VariableSet CO_SFXDummy1[CO_Index[2]] = (Last created unit)
    Unit - Create 1.SFXDummy1_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 270.00 degrees
    Set VariableSet CO_SFXDummy3[CO_Index[2]] = (Last created unit)
    Unit - Create 1.SFXDummy1_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 30.00 degrees
    Set VariableSet CO_SFXDummy5[CO_Index[2]] = (Last created unit)
    -------- SFXDummy2_CO --------
    Unit - Create 1.SFXDummy2_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 210.00 degrees
    Set VariableSet CO_SFXDummy2[CO_Index[2]] = (Last created unit)
    Unit - Create 1.SFXDummy2_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 330.00 degrees
    Set VariableSet CO_SFXDummy4[CO_Index[2]] = (Last created unit)
    Unit - Create 1.SFXDummy2_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 90.00 degrees
    Set VariableSet CO_SFXDummy6[CO_Index[2]] = (Last created unit)
    -------- SFXDummy3_CO --------
    Unit - Create 1.SFXDummy3_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 210.00 degrees
    Set VariableSet CO_SFXDummy7[CO_Index[2]] = (Last created unit)
    Unit - Create 1.SFXDummy3_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 330.00 degrees
    Set VariableSet CO_SFXDummy8[CO_Index[2]] = (Last created unit)
    Unit - Create 1.SFXDummy3_CO for (Owner of (Triggering unit)) at CO_CenterLoc[CO_Index[2]] facing 90.00 degrees
    Set VariableSet CO_SFXDummy9[CO_Index[2]] = (Last created unit)
    -------- -------------------------------------------------------------------------------------------------------------- --------
    -------- Removing leaks --------
    -------- -------------------------------------------------------------------------------------------------------------- --------
    Custom script: call RemoveLocation(udg_CO_TrigUnitLoc[udg_CO_Index[2]])
    Custom script: call RemoveLocation(udg_CO_TargUnitLoc[udg_CO_Index[2]])
    Custom script: call RemoveLocation(udg_CO_CenterLoc[udg_CO_Index[2]])
Comradeship Loop
  Events
    Time - Every 0.03 seconds of game time
  Conditions
  Actions
    For each (Integer CO_Index[3]) from 1 to CO_Index[2], do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            CO_Off[CO_Index[3]] Equal to True
          Then - Actions
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- This variable acts like the Wait action --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            Set VariableSet CO_WaitCounter[CO_Index[3]] = (CO_WaitCounter[CO_Index[3]] + 0.03)
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- A counter to later determine the position of each special effect dummy --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            Set VariableSet CO_EffectOffsetCounter[CO_Index[3]] = (CO_EffectOffsetCounter[CO_Index[3]] + CO_SFXSpeed[CO_Index[3]])
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                CO_EffectOffsetCounter[CO_Index[3]] Greater than or equal to 360.00
              Then - Actions
                Set VariableSet CO_EffectOffsetCounter[CO_Index[3]] = 0.00
              Else - Actions
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- These variables set the positions of both, the Triggering Unit and the Target Unit --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            Set VariableSet CO_TrigUnitLoc[CO_Index[3]] = (Position of CO_TrigUnit[CO_Index[3]])
            Set VariableSet CO_TargUnitLoc[CO_Index[3]] = (Position of CO_TargUnit[CO_Index[3]])
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- Mathematical equation to define four sections of the circle to be used to determine the damage of the units depending on the distance --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            Set VariableSet CO_DmgLevelIteger[CO_Index[3]] = ((Integer(CO_MaxDistance[CO_Index[3]])) / (Integer((Distance between CO_TrigUnitLoc[CO_Index[3]] and CO_TargUnitLoc[CO_Index[3]]))))
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- If/Then function to be sure the Integer doesn't go over 4 in order not to mix up with the damage of the other levels --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                CO_DmgLevelIteger[CO_Index[3]] Greater than 4
              Then - Actions
                Set VariableSet CO_DmgLevelIteger[CO_Index[3]] = 4
              Else - Actions
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- Sets the additional unit by setting the level of Comradeship Damage --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (CO_TrigUnit[CO_Index[3]] is in CO_Debug.) Equal to False
                (CO_TargUnit[CO_Index[3]] is in CO_Debug.) Equal to False
              Then - Actions
                Unit Group - Add CO_TrigUnit[CO_Index[3]] to CO_Debug
                Unit Group - Add CO_TargUnit[CO_Index[3]] to CO_Debug
                Unit - Add Comradeship Damage to CO_TrigUnit[CO_Index[3]]
                Unit - Add Comradeship Damage to CO_TargUnit[CO_Index[3]]
              Else - Actions
            Set VariableSet CO_DmgLevelDetermining[CO_Index[3]] = (CO_DmgLevelIteger[CO_Index[3]] + (((Level of Comradeship for CO_TrigUnit[CO_Index[3]]) - 1) x 4))
            Unit - Set level of Comradeship Damage for CO_TrigUnit[CO_Index[3]] to CO_DmgLevelDetermining[CO_Index[3]]
            Unit - Set level of Comradeship Damage for CO_TargUnit[CO_Index[3]] to CO_DmgLevelDetermining[CO_Index[3]]
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- Sets the X's and Y's of the positions of both units --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            Set VariableSet CO_TrigUnitX[CO_Index[3]] = (X of CO_TrigUnitLoc[CO_Index[3]])
            Set VariableSet CO_TargUnitX[CO_Index[3]] = (X of CO_TargUnitLoc[CO_Index[3]])
            Set VariableSet CO_TrigUnitY[CO_Index[3]] = (Y of CO_TrigUnitLoc[CO_Index[3]])
            Set VariableSet CO_TargUnitY[CO_Index[3]] = (Y of CO_TargUnitLoc[CO_Index[3]])
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- Simple "vector-midpoint" formula --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            Set VariableSet CO_CenterLoc[CO_Index[3]] = (Point(((CO_TrigUnitX[CO_Index[3]] + CO_TargUnitX[CO_Index[3]]) / 2.00), ((CO_TrigUnitY[CO_Index[3]] + CO_TargUnitY[CO_Index[3]]) / 2.00)))
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- Setting points for circular motion into variables --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                CO_WaitCounter[CO_Index[3]] Greater than or equal to 1.98
              Then - Actions
                Set VariableSet CO_PolProj1[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by (CO_MaxDistance[CO_Index[3]] / 2.00) towards (CO_EffectOffsetCounter[CO_Index[3]] + 60.00) degrees.)
                Set VariableSet CO_PolProj2[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by (CO_MaxDistance[CO_Index[3]] / 2.00) towards (CO_EffectOffsetCounter[CO_Index[3]] + 120.00) degrees.)
                Set VariableSet CO_PolProj3[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by (CO_MaxDistance[CO_Index[3]] / 2.00) towards (CO_EffectOffsetCounter[CO_Index[3]] + 180.00) degrees.)
                Set VariableSet CO_PolProj4[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by (CO_MaxDistance[CO_Index[3]] / 2.00) towards (CO_EffectOffsetCounter[CO_Index[3]] + 240.00) degrees.)
                Set VariableSet CO_PolProj5[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by (CO_MaxDistance[CO_Index[3]] / 2.00) towards (CO_EffectOffsetCounter[CO_Index[3]] + 300.00) degrees.)
                Set VariableSet CO_PolProj6[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by (CO_MaxDistance[CO_Index[3]] / 2.00) towards (CO_EffectOffsetCounter[CO_Index[3]] + 360.00) degrees.)
              Else - Actions
                Set VariableSet CO_SFXAlgeo[CO_Index[3]] = (CO_WaitCounter[CO_Index[3]] / 1.98)
                Set VariableSet CO_PolProj1[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by ((CO_MaxDistance[CO_Index[3]] / 2.00) x CO_SFXAlgeo[CO_Index[3]]) towards (CO_EffectOffsetCounter[CO_Index[3]] + 60.00) degrees.)
                Set VariableSet CO_PolProj2[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by ((CO_MaxDistance[CO_Index[3]] / 2.00) x CO_SFXAlgeo[CO_Index[3]]) towards (CO_EffectOffsetCounter[CO_Index[3]] + 120.00) degrees.)
                Set VariableSet CO_PolProj3[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by ((CO_MaxDistance[CO_Index[3]] / 2.00) x CO_SFXAlgeo[CO_Index[3]]) towards (CO_EffectOffsetCounter[CO_Index[3]] + 180.00) degrees.)
                Set VariableSet CO_PolProj4[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by ((CO_MaxDistance[CO_Index[3]] / 2.00) x CO_SFXAlgeo[CO_Index[3]]) towards (CO_EffectOffsetCounter[CO_Index[3]] + 240.00) degrees.)
                Set VariableSet CO_PolProj5[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by ((CO_MaxDistance[CO_Index[3]] / 2.00) x CO_SFXAlgeo[CO_Index[3]]) towards (CO_EffectOffsetCounter[CO_Index[3]] + 300.00) degrees.)
                Set VariableSet CO_PolProj6[CO_Index[3]] = (CO_CenterLoc[CO_Index[3]] offset by ((CO_MaxDistance[CO_Index[3]] / 2.00) x CO_SFXAlgeo[CO_Index[3]]) towards (CO_EffectOffsetCounter[CO_Index[3]] + 360.00) degrees.)
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- Checks the distance between both units, the value of CO_WaitCounter, and if any of the two units are dead or not --------
            -------- and if any of the Conditions apply Special Effects are destroyed, and additional damage and leaks removed --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Distance between CO_TrigUnitLoc[CO_Index[3]] and CO_TargUnitLoc[CO_Index[3]]) Greater than CO_MaxDistance[CO_Index[3]]
                    CO_WaitCounter[CO_Index[3]] Greater than or equal to CO_SpellLastingTime[CO_Index[3]]
                    (CO_TrigUnit[CO_Index[3]] is dead) Equal to True
                    (CO_TargUnit[CO_Index[3]] is dead) Equal to True
              Then - Actions
                Set VariableSet CO_Off[CO_Index[3]] = False
                -------- -------------------------------------------------------------------------------------------------------------- --------
                -------- Removing extra damage --------
                -------- -------------------------------------------------------------------------------------------------------------- --------
                Unit - Remove Comradeship Damage from CO_TrigUnit[CO_Index[3]]
                Unit - Remove Comradeship Damage from CO_TargUnit[CO_Index[3]]
                Unit Group - Remove CO_TrigUnit[CO_Index[3]] from CO_Debug.
                Unit Group - Remove CO_TargUnit[CO_Index[3]] from CO_Debug.
                -------- -------------------------------------------------------------------------------------------------------------- --------
                -------- Removing special effect dummies --------
                -------- -------------------------------------------------------------------------------------------------------------- --------
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy1[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy2[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy3[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy4[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy5[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy6[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy7[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy8[CO_Index[3]]
                Unit - Add a 0.01 second Generic expiration timer to CO_SFXDummy9[CO_Index[3]]
                -------- -------------------------------------------------------------------------------------------------------------- --------
                -------- Removing weapons' effects --------
                -------- -------------------------------------------------------------------------------------------------------------- --------
                Special Effect - Destroy CO_SFXTrig1[CO_Index[3]]
                Special Effect - Destroy CO_SFXTrig2[CO_Index[3]]
                Special Effect - Destroy CO_SFXTarg1[CO_Index[3]]
                Special Effect - Destroy CO_SFXTarg2[CO_Index[3]]
                -------- -------------------------------------------------------------------------------------------------------------- --------
                -------- Reseting Counters --------
                -------- -------------------------------------------------------------------------------------------------------------- --------
                Set VariableSet CO_WaitCounter[CO_Index[3]] = 0.00
                Set VariableSet CO_EffectOffsetCounter[CO_Index[3]] = 0.00
                -------- -------------------------------------------------------------------------------------------------------------- --------
                -------- Reducing CO_Index[1] because one spell instance has ended --------
                -------- -------------------------------------------------------------------------------------------------------------- --------
                Set VariableSet CO_Index[1] = (CO_Index[1] - 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    CO_Index[1] Equal to 0
                  Then - Actions
                    -------- -------------------------------------------------------------------------------------------------------------- --------
                    -------- Destroying Debug group --------
                    -------- -------------------------------------------------------------------------------------------------------------- --------
                    Custom script: call DestroyGroup(udg_CO_Debug)
                    Custom script: set udg_CO_Debug = null
                    -------- -------------------------------------------------------------------------------------------------------------- --------
                    -------- Resetting CO_Index[2] to 0 because no active spells are running then turning the trigger off --------
                    Set VariableSet CO_Index[2] = 0
                    -------- -------------------------------------------------------------------------------------------------------------- --------
                    Trigger - Turn off (This trigger)
                  Else - Actions
              Else - Actions
                -------- -------------------------------------------------------------------------------------------------------------- --------
                -------- Setting the special effect dummies in a circular motion --------
                -------- -------------------------------------------------------------------------------------------------------------- --------
                Unit - Move CO_SFXDummy1[CO_Index[3]] instantly to CO_PolProj1[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 150.00) degrees
                Unit - Move CO_SFXDummy2[CO_Index[3]] instantly to CO_PolProj2[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 210.00) degrees
                Unit - Move CO_SFXDummy3[CO_Index[3]] instantly to CO_PolProj3[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 270.00) degrees
                Unit - Move CO_SFXDummy4[CO_Index[3]] instantly to CO_PolProj4[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 330.00) degrees
                Unit - Move CO_SFXDummy5[CO_Index[3]] instantly to CO_PolProj5[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 30.00) degrees
                Unit - Move CO_SFXDummy6[CO_Index[3]] instantly to CO_PolProj6[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 90.00) degrees
                -------- - --------
                Unit - Move CO_SFXDummy7[CO_Index[3]] instantly to CO_PolProj2[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 210.00) degrees
                Unit - Move CO_SFXDummy8[CO_Index[3]] instantly to CO_PolProj4[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 330.00) degrees
                Unit - Move CO_SFXDummy9[CO_Index[3]] instantly to CO_PolProj6[CO_Index[3]], facing (CO_EffectOffsetCounter[CO_Index[3]] + 90.00) degrees
            -------- -------------------------------------------------------------------------------------------------------------- --------
            -------- Removing leaks --------
            -------- -------------------------------------------------------------------------------------------------------------- --------
            Custom script: call RemoveLocation(udg_CO_TrigUnitLoc[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_TargUnitLoc[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_CenterLoc[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_PolProj1[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_PolProj2[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_PolProj3[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_PolProj4[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_PolProj5[udg_CO_Index[3]])
            Custom script: call RemoveLocation(udg_CO_PolProj6[udg_CO_Index[3]])
          Else - Actions
//TESH.scrollpos=0
//TESH.alwaysfold=0
Simple spell which I am not very sure on whether it might come in handy for anyone or not.

However, here is what the spell does:
//The Hero creates a bond between him and an ally unit. This bond grows stronger as the two units get closer to
//each other, thus amplifying their damage. If the units get very distant from one another, the bond breaks.



How to adjust and customize:

'Adjuting damage': In the "Object Editor", adjust the "Attack Bonus" of the "Comradeship Damage" ability.
                   That might seem a bit complex, but this is how it works:
                   Every set of 4 levels stand for the damages for one level.
                   Example: Level 1, 2, 3, 4 set the damage for the Level 1 of "Comradeship"
                            Level 5, 6, 7, 8 set the damage for the Level 2 of "Comradeship"
                            Level 9, 10, 11, 12 set the damage for the Level 3 of "Comradeship"
                            etc...
                   The damage of the lowest level among the set of 4 is the lowest, and that of the highest level
                   is the highest among the set of 4.
                   
'Adjusting the maximum distance between the two units before dispelling the spell':
                   Simply adjust the value of "CO_MaxDistance" in the trigger "Comradeship Main"

'Adjusting the time for which the effect of the spell lasts':
                   Simply adjust the value of "CO_SpellLastingTime" in the trigger "Comradeship Main"
                   
'Adjusting the special effects':
                   Concerning the special effects of the weaponry, go through the triggers "Comradeship Main" and "Comradeship Loop" and adjust the Special
                   Effects.
                   Concerning the special effects of the circle, adjust the "Model File" of "SFXDummy_CO" in the
                   Object Editor (Units).
                   
'Adjusting the motion speed of the special effects':
                   Simply adjust the value of "CO_SFXSpeed" in the trigger "Comradeship Main".
                   The speed is in degree/0.03s. The adviced speeds would be between 5 and 10.
                   
    //GUI isn't user friendly; however, I tried my best make things easily adjustable!
   
   
                   
How to import:

- In the Preferences of the World Editor, check (turn on) the option "Automcatically create unknown variables
  while pasting trigger data"
.
- Copy and paste the abilities "Comradeship" and "Comradeship Damage" in the Object Editor into your map.
- Copy and paste the units "SFXDummy1_CO", "SFXDummy2_CO", and "SFXDummy3_CO" in the Object Editor into your map.
- Copy and paste the triggers "Comradeship Main", "Comradeship Loop", and "Comradeship Preload" in the Trigger
  Editor into your map.
- Adjust the corrupted Condition in "Comradeship Main" into '(Ability being cast) Equal to Comradeship'.
- Adjust the corrupted Actions in "Comradeship Main" and "Comradeship Preload" by replacing the 'Unit' with
  'SFXDummy1_CO', 'SFXDummy2_CO', and 'SFXDummy3_CO' according to the "trigger comment" placed above these
  corrupted actions.



Credit is appreciated but unnecessary.
//TESH.scrollpos=0
//TESH.alwaysfold=0
v1.00:
// Released.

v1.01:
// Removed the minor lag.
// Changed special effects.
// Decreased the refresh rate of the periodic timer from 0.20s to 0.03s.
// Fixed a problem concerning leaks removal (credits to Rmx for pointing that out).
// Fixed a minor mistake concerning MUI Indexing (credits to Rmx for pointing that out).
// Slightly adjusted tooltips.
// Slightly adjusted documentation.
// Added a preload trigger.

v1.02:
// Removed all leaks (credits to Dark_Dragon for pointing the leaks out).
// Fixed a bug concerning MUI (credits to Rmx for fixing that).
// Changed special effects (credits to -BerZeKeR- for advising the special effect models).

v1.03
// Increased efficiency.
// Adjusted a little Custom Scrip mistake.
//TESH.scrollpos=0
//TESH.alwaysfold=0
Credits to:

'Rmx'
- pin-pointing unremoved point leaks
- pin-pointing a mistake concerning Indexing
- fixing a bug

'Dark_Dragon'
- pin-pointing unremoved leaks
- advising on how-to-improve

'-BerZeKeR-'
- picking more creative special effect models
Map Intialization
  Events
    Map initialization
  Conditions
  Actions
    Visibility - Disable fog of war
    Visibility - Disable black mask
Reset
  Events
    Player - Player 1 (Red) skips a cinematic sequence
  Conditions
  Actions
    Unit - Set life of Paladin 0001 <gen> to 100%
    Unit - Set mana of Paladin 0001 <gen> to 100%
    Unit - Reset ability cooldowns for Paladin 0001 <gen>.
    -------- - --------
    Unit - Set life of Blademaster 0004 <gen> to 100%
    Unit - Set mana of Blademaster 0004 <gen> to 100%
    Unit - Reset ability cooldowns for Blademaster 0004 <gen>.