• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Cranium Rush v1.0a

===ABILITY TOOLTIP===
Rushes towards the target and pushes the target to a certain distance dealing certain damage.
During the Rush,the caster is invulnerable and after the rush,the caster has a increased attack speed and move speed.The target cannot move during this spell.

Level 1 - 120 push damage,40% AS increase,25% MS increase.
Level 2 - 180 push damage,55% AS increase,50% MS increase.
Level 3 - 220 push damage,70% AS increase,75% MS increase.
Level 4 - 280 push damage,85% AS increase,100% MS increase.

Cooldown = 1 seconds.
Mana Cost = 0



  • CaRu Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ----------------------------CONFIGURATION START---------------------------- --------
      • -------- Is the caster alive? --------
      • Set CaRu_Condition_Config[1] = True
      • -------- Is the target alive? --------
      • Set CaRu_Condition_Config[2] = True
      • -------- 1=Make Invulnerable ,,, Other Numbers=Don't Make Invulnerable --------
      • -------- If this number is set to other numbers except "1" it will not make the caster invulnerable --------
      • Set CaRu_Invulnerable = 1
      • -------- The default animation speed which will be used at the end of the spell resetting the animation speed --------
      • Set CaRu_Normal_Animation_Speed = 100.00
      • -------- The animation name that is played at the start of the spell --------
      • Set CaRu_Animation_Type = spin
      • -------- The animation speed that is set to the caster --------
      • Set CaRu_Animation_Speed = 150.00
      • -------- The damaging type[Arrays are Spell Levels] --------
      • Set CaRu_Attack_Type[1] = Chaos
      • Set CaRu_Attack_Type[2] = Chaos
      • Set CaRu_Attack_Type[3] = Chaos
      • Set CaRu_Attack_Type[4] = Chaos
      • -------- The Damage Caused[Arrays are Spell Levels] --------
      • Set CaRu_Damage[1] = 120.00
      • Set CaRu_Damage[2] = 180.00
      • Set CaRu_Damage[3] = 220.00
      • Set CaRu_Damage[4] = 280.00
      • -------- The max distance that the target will be recoiled [Arrays are Spell Levels] --------
      • Set CaRu_Recoil_Border[1] = 800.00
      • Set CaRu_Recoil_Border[2] = 800.00
      • Set CaRu_Recoil_Border[3] = 800.00
      • Set CaRu_Recoil_Border[4] = 800.00
      • -------- The min distance that the caster must come to the target before pushing [Arrays are Spell Levels] *MUST be ABOVE 100 --------
      • Set CaRu_Min_Distance[1] = 130.00
      • Set CaRu_Min_Distance[2] = 130.00
      • Set CaRu_Min_Distance[3] = 130.00
      • Set CaRu_Min_Distance[4] = 130.00
      • -------- The max height that the target will be increased [Arrays are Spell Levels] --------
      • Set CaRu_Max_Height[1] = 300.00
      • Set CaRu_Max_Height[2] = 300.00
      • Set CaRu_Max_Height[3] = 300.00
      • Set CaRu_Max_Height[4] = 300.00
      • -------- The interval of the loop trigger --------
      • Set CaRu_Interval = 0.03
      • -------- The total time that the target will be send back flying [Arrays are Spell Levels] --------
      • Set CaRu_Total_Recoil_Time[1] = 1.00
      • Set CaRu_Total_Recoil_Time[2] = 1.00
      • Set CaRu_Total_Recoil_Time[3] = 1.00
      • Set CaRu_Total_Recoil_Time[4] = 1.00
      • -------- The speed of charging towards the target [Arrays are Spell Levels] --------
      • Set CaRu_Rush_Speed[1] = 30.00
      • Set CaRu_Rush_Speed[2] = 30.00
      • Set CaRu_Rush_Speed[3] = 30.00
      • Set CaRu_Rush_Speed[4] = 30.00
      • -------- The speed of recoiling of the target [Arrays are Spell Levels] --------
      • -------- This is calculated to be fitted with the flying height....you can change the time which it related with speed --------
      • Set CaRu_Recoil_Speed[1] = (CaRu_Recoil_Border[1] x (CaRu_Interval / CaRu_Total_Recoil_Time[1]))
      • Set CaRu_Recoil_Speed[2] = (CaRu_Recoil_Border[2] x (CaRu_Interval / CaRu_Total_Recoil_Time[2]))
      • Set CaRu_Recoil_Speed[3] = (CaRu_Recoil_Border[3] x (CaRu_Interval / CaRu_Total_Recoil_Time[3]))
      • Set CaRu_Recoil_Speed[4] = (CaRu_Recoil_Border[4] x (CaRu_Interval / CaRu_Total_Recoil_Time[4]))
      • -------- The Attachment and The Model Files created on the caster --------
      • Set CaRu_Attachment[1] = origin
      • Set CaRu_Effect_Model[1] = Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmMissile.mdl
      • Set CaRu_Attachment[2] = origin
      • Set CaRu_Effect_Model[2] = Abilities\Spells\Other\CrushingWave\CrushingWaveMissile.mdl
      • Set CaRu_Attachment[3] = weapon
      • Set CaRu_Effect_Model[3] = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
      • -------- The Attachment and The Model File created upon the recoil and finish --------
      • Set CaRu_Attachment[4] = origin
      • Set CaRu_Effect_Model[4] = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Set CaRu_Attachment[5] = chest
      • Set CaRu_Effect_Model[5] = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
      • -------- Saving Spell Variable --------
      • Set CaRu_Spell = Cranium Rush
      • -------- Saving Dummy Spell Variable --------
      • Set CaRu_Added_Spell = Cranium Rush(Dummy)
      • -------- Saving Dummy as a Unit-Type Variable --------
      • Set CaRu_Dummy_Type = Universal Dummy
      • -------- ----------------------------CONFIGURATION END---------------------------- --------
      • Trigger - Add to CaRu Loop <gen> the event (Time - Every CaRu_Interval seconds of game time)


  • CaRu Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to CaRu_Spell
    • Actions
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------IDEXING SYSTEM START---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CaRu_Index_Listener Equal to 0
        • Then - Actions
          • Trigger - Turn on CaRu Loop <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CaRu_Recycle_Size Greater than 0
        • Then - Actions
          • Set CaRu_Recycle_Size = (CaRu_Recycle_Size - 1)
          • Set CaRu_Current_Index = CaRu_Recycle_Container[CaRu_Recycle_Size]
        • Else - Actions
          • Set CaRu_Current_Index = CaRu_Index_Size
          • Set CaRu_Index_Size = (CaRu_Index_Size + 1)
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------INDEXING SYSTEM END---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Sets the stage of the spell---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Stage[CaRu_Current_Index] = 0
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the caster in it's index---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Caster[CaRu_Current_Index] = (Triggering unit)
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Makes/Don't Make the caster Invulnerable---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CaRu_Invulnerable Equal to 1
        • Then - Actions
          • Unit - Make CaRu_Caster[CaRu_Current_Index] Invulnerable
        • Else - Actions
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the caster point---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Caster_Point = (Position of CaRu_Caster[CaRu_Current_Index])
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the Level of the spell---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Level[CaRu_Current_Index] = (Level of CaRu_Spell for CaRu_Caster[CaRu_Current_Index])
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the time of recoil---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Timer[CaRu_Current_Index] = CaRu_Total_Recoil_Time[CaRu_Level[CaRu_Current_Index]]
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the owner of the caster---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Owner[CaRu_Current_Index] = (Owner of CaRu_Caster[CaRu_Current_Index])
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the target in it's index---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Target[CaRu_Current_Index] = (Target unit of ability being cast)
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Adds the flying ability which will make the target's flying height to be changeable---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Custom script: if UnitAddAbility(udg_CaRu_Target[udg_CaRu_Current_Index],'Amrf') and UnitRemoveAbility(udg_CaRu_Target[udg_CaRu_Current_Index],'Amrf') then
      • Custom script: endif
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the target point---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Target_Point = (Position of CaRu_Target[CaRu_Current_Index])
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Saves the angle which will be using in pushing the target---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Constant_Angle[CaRu_Current_Index] = (Angle from CaRu_Caster_Point to CaRu_Target_Point)
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Plays the configurable animation and change the animation speed---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Animation - Play CaRu_Caster[CaRu_Current_Index]'s CaRu_Animation_Type animation
      • Animation - Change CaRu_Caster[CaRu_Current_Index]'s animation speed to CaRu_Animation_Speed% of its original speed
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Creates the dummy target at the target point which will be using as a middle unit and saves it into a variable---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Unit - Create 1 CaRu_Dummy_Type for CaRu_Owner[CaRu_Current_Index] at CaRu_Target_Point facing (Angle from CaRu_Target_Point to (Position of (Triggering unit))) degrees
      • Set CaRu_Dummy[CaRu_Current_Index] = (Last created unit)
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Adds the secondary spell to the dummy and sets the added spell level to "CaRu_Level"---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Unit - Add CaRu_Added_Spell to CaRu_Dummy[CaRu_Current_Index]
      • Unit - Set level of CaRu_Added_Spell for CaRu_Dummy[CaRu_Current_Index] to CaRu_Level[CaRu_Current_Index]
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Creates the special effects on the caster and saves into variables---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Custom script: set udg_CaRu_SE_1[udg_CaRu_Current_Index] = AddSpecialEffectTarget(udg_CaRu_Effect_Model[1], udg_CaRu_Caster[udg_CaRu_Current_Index], udg_CaRu_Attachment[1])
      • Custom script: set udg_CaRu_SE_2[udg_CaRu_Current_Index] = AddSpecialEffectTarget(udg_CaRu_Effect_Model[2], udg_CaRu_Caster[udg_CaRu_Current_Index], udg_CaRu_Attachment[2])
      • Custom script: set udg_CaRu_SE_3[udg_CaRu_Current_Index] = AddSpecialEffectTarget(udg_CaRu_Effect_Model[3], udg_CaRu_Caster[udg_CaRu_Current_Index], udg_CaRu_Attachment[3])
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------Removing the LEAKS---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_CaRu_Target_Point)
      • Custom script: call RemoveLocation(udg_CaRu_Caster_Point)
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------IDEXING SYSTEM START---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • Set CaRu_Index_Container[CaRu_Index_Listener] = CaRu_Current_Index
      • Set CaRu_Index_Listener = (CaRu_Index_Listener + 1)
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------IDEXING SYSTEM END---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------


  • CaRu Loop
    • Events
    • Conditions
    • Actions
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------IDEXING SYSTEM START---------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • For each (Integer CaRu_Loop) from 0 to (CaRu_Index_Listener - 1), do (Actions)
        • Loop - Actions
          • Set CaRu_Current_Index = CaRu_Index_Container[CaRu_Loop]
          • -------- ---------------------------------------------------------------------------------------------------------------- --------
          • -------- ---------------------------------------------------------------------------------------------------------------- --------
          • -------- ----------------------------IDEXING SYSTEM END---------------------------- --------
          • -------- ---------------------------------------------------------------------------------------------------------------- --------
          • -------- ---------------------------------------------------------------------------------------------------------------- --------
          • -------- ----------------------------This is the main condition If it returns false it will end the spell---------------------------- --------
          • -------- ---------------------------------------------------------------------------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (CaRu_Caster[CaRu_Current_Index] is alive) Equal to CaRu_Condition_Config[1]
              • (CaRu_Target[CaRu_Current_Index] is alive) Equal to CaRu_Condition_Config[2]
            • Then - Actions
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ----------------------------Making the target not to move---------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • Unit - Order CaRu_Target[CaRu_Current_Index] to Stop
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ----------------------------This is the second main condition If it returns false it will change the stage of the spell---------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CaRu_Stage[CaRu_Current_Index] Equal to 0
                • Then - Actions
                  • -------- ---------------------------------------------------------------------------------------------------------------- --------
                  • -------- ----------------------------Saves the caster point and target point---------------------------- --------
                  • -------- ---------------------------------------------------------------------------------------------------------------- --------
                  • Set CaRu_Caster_Point = (Position of CaRu_Caster[CaRu_Current_Index])
                  • Set CaRu_Target_Point = (Position of CaRu_Target[CaRu_Current_Index])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Distance between CaRu_Caster_Point and CaRu_Target_Point) Less than or equal to 10.00
                          • (Distance between CaRu_Caster_Point and CaRu_Target_Point) Greater than or equal to CaRu_Min_Distance[CaRu_Level[CaRu_Current_Index]]
                    • Then - Actions
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ----------------------------Saves the angle from caster to the target---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Set CaRu_Angle[CaRu_Current_Index] = (Angle from CaRu_Caster_Point to CaRu_Target_Point)
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ----------------------------Moves the caster towards the saved angle---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Custom script: call SetUnitX(udg_CaRu_Caster[udg_CaRu_Current_Index],GetUnitX(udg_CaRu_Caster[udg_CaRu_Current_Index]) + udg_CaRu_Rush_Speed[udg_CaRu_Level[udg_CaRu_Current_Index]] * Cos(udg_CaRu_Angle[udg_CaRu_Current_Index] * bj_DEGTORAD))
                      • Custom script: call SetUnitY(udg_CaRu_Caster[udg_CaRu_Current_Index],GetUnitY(udg_CaRu_Caster[udg_CaRu_Current_Index]) + udg_CaRu_Rush_Speed[udg_CaRu_Level[udg_CaRu_Current_Index]] * Sin(udg_CaRu_Angle[udg_CaRu_Current_Index] * bj_DEGTORAD))
                    • Else - Actions
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ----------------------------Causes damage to the target---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Unit - Cause CaRu_Caster[CaRu_Current_Index] to damage CaRu_Target[CaRu_Current_Index], dealing CaRu_Damage[CaRu_Level[CaRu_Current_Index]] damage of attack type CaRu_Attack_Type[CaRu_Level[CaRu_Current_Index]] and damage type Normal
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ----------------------------Instantly creates and destroy the created special effect---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_CaRu_Effect_Model[4], udg_CaRu_Target[udg_CaRu_Current_Index],udg_CaRu_Attachment[4]))
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ----------------------------Destroy the special effects created on the caster---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Custom script: call DestroyEffect(udg_CaRu_SE_1[udg_CaRu_Current_Index])
                      • Custom script: call DestroyEffect(udg_CaRu_SE_2[udg_CaRu_Current_Index])
                      • Custom script: call DestroyEffect(udg_CaRu_SE_3[udg_CaRu_Current_Index])
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ----------------------------Creates the special effect on the target and saves it into a variable---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Custom script: set udg_CaRu_SE_1[udg_CaRu_Current_Index] = AddSpecialEffectTarget(udg_CaRu_Effect_Model[5], udg_CaRu_Target[udg_CaRu_Current_Index], udg_CaRu_Attachment[5])
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ---------------------------Resetting Animation Speed---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Animation - Change CaRu_Caster[CaRu_Current_Index]'s animation speed to CaRu_Normal_Animation_Speed% of its original speed
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ---------------------------Making the caster back to vulerable state---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Unit - Make CaRu_Caster[CaRu_Current_Index] Vulnerable
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • -------- ---------------------------Changes the stage so that in the next loop the secondary condition will return false and will run the else block which contains the next stage of spell---------------------------- --------
                      • -------- ---------------------------------------------------------------------------------------------------------------- --------
                      • Set CaRu_Stage[CaRu_Current_Index] = 1
                  • -------- ---------------------------------------------------------------------------------------------------------------- --------
                  • -------- ---------------------------REMOVING LOCATION LEAKS---------------------------- --------
                  • -------- ---------------------------------------------------------------------------------------------------------------- --------
                  • Custom script: call RemoveLocation(udg_CaRu_Caster_Point)
                  • Custom script: call RemoveLocation(udg_CaRu_Target_Point)
                • Else - Actions
                  • -------- ---------------------------------------------------------------------------------------------------------------- --------
                  • -------- ----------------------------This is the third main condition If it returns false it will change the stage of the spell---------------------------- --------
                  • -------- ---------------------------------------------------------------------------------------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CaRu_Stage[CaRu_Current_Index] Equal to 1
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CaRu_Timer[CaRu_Current_Index] Greater than 0.00
                        • Then - Actions
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Timer work subtracts the interval in every loop--------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Set CaRu_Timer[CaRu_Current_Index] = (CaRu_Timer[CaRu_Current_Index] - CaRu_Interval)
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Saves the dummy point and target point and the distance between those two points--------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Set CaRu_Dummy_Point = (Position of CaRu_Dummy[CaRu_Current_Index])
                          • Set CaRu_Target_Point = (Position of CaRu_Target[CaRu_Current_Index])
                          • -------- ----------------------------Why save the distance between here?--------------------------- --------
                          • -------- ----------------------------We'll need to use that in the height formula so it's better to save it--------------------------- --------
                          • Set CaRu_Distance[CaRu_Current_Index] = (Distance between CaRu_Dummy_Point and CaRu_Target_Point)
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Saves the angle from dummy to the target---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Set CaRu_Angle[CaRu_Current_Index] = (Angle from CaRu_Dummy_Point to CaRu_Target_Point)
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Moves the caster towards the saved angle---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Custom script: call SetUnitX(udg_CaRu_Target[udg_CaRu_Current_Index],GetUnitX(udg_CaRu_Target[udg_CaRu_Current_Index]) + udg_CaRu_Recoil_Speed[udg_CaRu_Level[udg_CaRu_Current_Index]] * Cos(udg_CaRu_Constant_Angle[udg_CaRu_Current_Index] * bj_DEGTORAD))
                          • Custom script: call SetUnitY(udg_CaRu_Target[udg_CaRu_Current_Index],GetUnitY(udg_CaRu_Target[udg_CaRu_Current_Index]) + udg_CaRu_Recoil_Speed[udg_CaRu_Level[udg_CaRu_Current_Index]] * Sin(udg_CaRu_Constant_Angle[udg_CaRu_Current_Index] * bj_DEGTORAD))
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Calculates the height for the target using height formula (***Formula by Radamantus***)---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Set CaRu_Height[CaRu_Current_Index] = (((4.00 x CaRu_Max_Height[CaRu_Level[CaRu_Current_Index]]) / CaRu_Recoil_Border[CaRu_Level[CaRu_Current_Index]]) x ((CaRu_Recoil_Border[CaRu_Level[CaRu_Current_Index]] - CaRu_Distance[CaRu_Current_Index]) x (CaRu_Distance[CaRu_Current_Index] / CaRu_Recoil_Bor
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Changes the calculated height at an instant rate (rate--0 = Instant)---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Animation - Change CaRu_Target[CaRu_Current_Index] flying height to CaRu_Height[CaRu_Current_Index] at 0.00
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ---------------------------REMOVING LOCATION LEAKS---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Custom script: call RemoveLocation(udg_CaRu_Dummy_Point)
                          • Custom script: call RemoveLocation(udg_CaRu_Target_Point)
                        • Else - Actions
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Resetting height and changing---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Set CaRu_Height[CaRu_Current_Index] = 0.00
                          • Animation - Change CaRu_Target[CaRu_Current_Index] flying height to CaRu_Height[CaRu_Current_Index] at 0.00
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Destroy the special effects created on the target---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Custom script: call DestroyEffect(udg_CaRu_SE_1[udg_CaRu_Current_Index])
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Instantly creates and destroy the created special effect---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_CaRu_Effect_Model[4], udg_CaRu_Target[udg_CaRu_Current_Index],udg_CaRu_Attachment[4]))
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------Gives a short amount of expiration time to the dummy unit---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Unit - Add a 1.00 second Generic expiration timer to CaRu_Dummy[CaRu_Current_Index]
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ---------------------------Orders the dummy to cast the spell on the caster increasing move speed and attack speed---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Unit - Order CaRu_Dummy[CaRu_Current_Index] to Orc Shaman - Bloodlust CaRu_Caster[CaRu_Current_Index]
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ---------------------------Changes the stage so that in the next loop the third condition will return false and will run the else block which contains the next stage of spell---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Set CaRu_Stage[CaRu_Current_Index] = 2
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CaRu_Stage[CaRu_Current_Index] Equal to 2
                        • Then - Actions
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------IDEXING SYSTEM START---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • Set CaRu_Index_Listener = (CaRu_Index_Listener - 1)
                          • Set CaRu_Index_Container[CaRu_Loop] = CaRu_Index_Container[CaRu_Index_Listener]
                          • Set CaRu_Recycle_Container[CaRu_Current_Index] = CaRu_Current_Index
                          • Set CaRu_Recycle_Size = (CaRu_Recycle_Size + 1)
                          • Set CaRu_Loop = (CaRu_Loop - 1)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CaRu_Index_Listener Equal to 0
                            • Then - Actions
                              • Trigger - Turn off CaRu Loop <gen>
                            • Else - Actions
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ----------------------------IDEXING SYSTEM END---------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                          • -------- ---------------------------------------------------------------------------------------------------------------- --------
                        • Else - Actions
            • Else - Actions
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ---------------------------If the caster or target dies during the loop---------------------------- --------
              • -------- ---------------------------gives a expiration timer to the dummy---------------------------- --------
              • -------- ---------------------------changes the caster's animation speed back to normal---------------------------- --------
              • -------- ---------------------------turns the colision off---------------------------- --------
              • -------- ---------------------------and destroys the created special effects---------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • Custom script: call DestroyEffect(udg_CaRu_SE_1[udg_CaRu_Current_Index])
              • Custom script: call DestroyEffect(udg_CaRu_SE_2[udg_CaRu_Current_Index])
              • Custom script: call DestroyEffect(udg_CaRu_SE_3[udg_CaRu_Current_Index])
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • Unit - Add a 1.00 second Generic expiration timer to CaRu_Dummy[CaRu_Current_Index]
              • Animation - Change CaRu_Caster[CaRu_Current_Index]'s animation speed to CaRu_Normal_Animation_Speed% of its original speed
              • Unit - Turn collision for CaRu_Caster[CaRu_Current_Index] On
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ----------------------------IDEXING SYSTEM START---------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • Set CaRu_Index_Listener = (CaRu_Index_Listener - 1)
              • Set CaRu_Index_Container[CaRu_Loop] = CaRu_Index_Container[CaRu_Index_Listener]
              • Set CaRu_Recycle_Container[CaRu_Current_Index] = CaRu_Current_Index
              • Set CaRu_Recycle_Size = (CaRu_Recycle_Size + 1)
              • Set CaRu_Loop = (CaRu_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CaRu_Index_Listener Equal to 0
                • Then - Actions
                  • Trigger - Turn off CaRu Loop <gen>
                • Else - Actions
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ----------------------------IDEXING SYSTEM END---------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------
              • -------- ---------------------------------------------------------------------------------------------------------------- --------


  • CaRu Dummy Remover
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Universal Dummy
    • Actions
      • Unit - Remove (Triggering unit) from the game




craniumrushv10ajp.jpg



rushingtime.jpg



recoiledtime.jpg



recoiledflyingtime.jpg




Version 1.0 First Uploaded and Approved
Version 1.0a Added "Minimum Distance" to the configuration trigger.
Changed some trigger usages.
Added New Screenshots
Changed Test Units


PLEASE RATE THE SPELL

Keywords:
Rush,Colide,Recoil,Fly,Damage,Run,Slam,TRIGGER,GUI,MUI,BUP,Dynamic INDEXING,Spell,Multi-Effects
Contents

Cranium Rush v1.0 (Map)

Reviews
15:57, 18th Dec 2012 Magtheridon96: Beautiful, but I'd recommend re-using one of the 3 special effect arrays for stage 1 because after stage 0 is over, they become useless. A fourth array is not needed.

Moderator

M

Moderator

15:57, 18th Dec 2012
Magtheridon96: Beautiful, but I'd recommend re-using one of the 3 special effect arrays for stage 1 because after stage 0 is over, they become useless. A fourth array is not needed.
 
Review:
1.Use this auto flyer line:
[jass=]
if UnitAddAbility(myunit,'Amrf') and UnitRemoveAbility(myunit,'Amrf') then
endif[/code]
to decrease line
2.Creating sfx should be inside the Integer Loop(for loop integer my integer)
3.Leaks a location when creating a unit:
Position of triggering unit
4.special effect(not the model) should be an array.
5.remove the turn collision off/on because SetUnitX/Y ignores collision
6.you dont need to reset the height as i have mentioned before about the arc formula,because the arc automatically resets to zero.
7.Min distance should be configurable,or i suggest using my system GetUnitCollisionSize is much better.
This needs fix BUP
 
Last edited:

BUP

BUP

Level 9
Joined
Sep 9, 2012
Messages
172
I don't understand no.2
I think the point in the cast trigger does not leak it is created at the variable point"CaRu_Target_Point" and I removed that after I finished using it.
4.special effect(not the model) should be an array.
You mean I should use only one variable with 1,2,3 arrays? instead of using 3 special effect variables
like this?

  • Special Effect - Create a special effect attached to the CaRu_Attachment[1] of CaRu_Caster[CaRu_Current_Index] using CaRu_Effect_Model[1]
  • Set CaRu_SE_1[CaRu_Current_Index] = (Last created special effect)
  • Special Effect - Create a special effect attached to the CaRu_Attachment[2] of CaRu_Caster[CaRu_Current_Index] using CaRu_Effect_Model[2]
  • Set CaRu_SE_2[CaRu_Current_Index] = (Last created special effect)
  • Special Effect - Create a special effect attached to the CaRu_Attachment[3] of CaRu_Caster[CaRu_Current_Index] using CaRu_Effect_Model[3]
  • Set CaRu_SE_3[CaRu_Current_Index] = (Last created special effect)


  • Special Effect - Create a special effect attached to the CaRu_Attachment[1] of CaRu_Caster[CaRu_Current_Index] using CaRu_Effect_Model[1]
  • Set CaRu_SE[1] = (Last created special effect)
  • Special Effect - Create a special effect attached to the CaRu_Attachment[2] of CaRu_Caster[CaRu_Current_Index] using CaRu_Effect_Model[2]
  • Set CaRu_SE[2] = (Last created special effect)
  • Special Effect - Create a special effect attached to the CaRu_Attachment[3] of CaRu_Caster[CaRu_Current_Index] using CaRu_Effect_Model[3]
  • Set CaRu_SE[3] = (Last created special effect)
 
damn right BUP
But if you want the code to be short
Here See This

  • Custom script: set udg_CaRu_SE[1] = AddSpecialEffectTarget(CaRu_Effect_Model[1], CaRu_Caster[CaRu_Current_Index], CaRu_Attachment[1])
  • Custom script: set udg_CaRu_SE[2] = AddSpecialEffectTarget(CaRu_Effect_Model[2], CaRu_Caster[CaRu_Current_Index], CaRu_Attachment[2])
  • Custom script: set udg_CaRu_SE[3] = AddSpecialEffectTarget(CaRu_Effect_Model[3], CaRu_Caster[CaRu_Current_Index], CaRu_Attachment[3])
And you could destroy it easily like this.
  • Custom script: call DestroyEffect(udg_CaRu_SE[1])
  • Custom script: call DestroyEffect(udg_CaRu_SE[2])
  • Custom script: call DestroyEffect(udg_CaRu_SE[3])
 
Level 1
Joined
May 22, 2011
Messages
1
you should check if the target unit dies - if the unit dies while you are charging him he just stops and keeps spining there awkwardly :>.A nice spell
 
Top