Spell Curved Ice Chain

Dirac

22710180
Reaction score
147
Curved Ice Chain - By Dirac

Based in DotA's Meat Hook i decided to create a version of a hook that bends, increasing probabilities to catch the enemy and style :p. If you're not good at maths stay away from the code, it uses some complex formulas at it (some of them are hard to explain for me)

The Code:
Trigger:
  • Curved Ice Chain
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curved Ice Chain
    • Actions
      • Set CICpoint[1] = (Position of (Casting unit))
      • Set CICpoint[2] = (Target point of ability being cast)
      • Set Viking = (Casting unit)
      • Set CICspotinit = (CICpoint[1] offset by ((Cos(CICangle)) x ((Distance between CICpoint[1] and CICpoint[2]) / 1.00)) towards ((Angle from CICpoint[1] to CICpoint[2]) - CICangle) degrees)
      • Trigger - Turn on Curved Ice Chain Shot <gen>


Trigger:
  • Curved Ice Chain Shot
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CICslide Greater than or equal to (((Real((Level of Curved Ice Chain for Viking))) x (30.00 - ((Distance between CICpoint[1] and CICpoint[2]) / 100.00))) + 5.00)
          • CICtarget Equal to No unit
        • Then - Actions
          • Trigger - Turn on Curved Ice Chain Back <gen>
          • Trigger - Turn off (This trigger)
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CICtarget Not equal to No unit
        • Then - Actions
          • Set TempPoint = (Position of CICdummys[(Integer(CICslide))])
          • Unit - Move CICtarget instantly to TempPoint
          • Custom script: call RemoveLocation (udg_TempPoint)
          • Unit - Remove CICdummys[(Integer(CICslide))] from the game
          • Set CICslide = (CICslide - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CICslide Equal to 0.00
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Set CICtarget = No unit
              • Set CICslide = 0.00
              • Set CICangle = 45.00
              • Custom script: call RemoveLocation (udg_CICspotinit)
              • Custom script: call RemoveLocation (udg_CICpoint[1])
              • Custom script: call RemoveLocation (udg_CICpoint[2])
            • Else - Actions
          • Skip remaining actions
        • Else - Actions
      • Set CICslide = (CICslide + 1.00)
      • Set CICangle = (CICangle + 0.20)
      • Set CICspot = (CICspotinit offset by (CICslide x 4.00) towards ((Angle from CICpoint[1] to CICpoint[2]) - 0.00) degrees)
      • Set TempPoint = (CICspot offset by ((Cos(CICangle)) x (Distance between CICpoint[1] and CICpoint[2])) towards ((Angle from CICspot to CICpoint[1]) - (CICslide x (2800.00 / (Distance between CICpoint[1] and CICpoint[2])))) degrees)
      • Unit - Create 1 BH Progectile for (Owner of Viking) at TempPoint facing (((Angle from CICspot to (CICspot offset by ((Cos(CICangle)) x (Distance between CICpoint[1] and CICpoint[2])) towards ((Angle from CICspot to CICpoint[1]) - (CICslide x (2800.00 / (Distance between CICpoint[1] and CICpoint[2])))) degrees)) + 0.00) - 90.00) degrees
      • Custom script: call RemoveLocation (udg_CICspot)
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Set CICdummys[(Integer(CICslide))] = (Last created unit)
      • Set TempGroup = (Random 1 units from (Units within 130.00 of (Position of (Last created unit)) matching ((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to Viking))))
      • Unit Group - Pick every unit in (Random 1 units from TempGroup) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to False
            • Then - Actions
              • Set CICtarget = (Picked unit)
              • Special Effect - Create a special effect attached to the origin of CICtarget using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of Viking)) Equal to True
                • Then - Actions
                  • Unit - Cause Viking to damage CICtarget, dealing ((Real((Level of Curved Ice Chain for Viking))) x 100.00) damage of attack type Spells and damage type Normal
                • Else - Actions
            • Else - Actions
      • Custom script: call DestroyGroup (udg_TempGroup)


Trigger:
  • Curved Ice Chain Back
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit - Remove CICdummys[(Integer(CICslide))] from the game
      • Set CICslide = (CICslide - 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CICslide Equal to 0.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set CICangle = 45.00
          • Custom script: call RemoveLocation (udg_CICpoint[1])
          • Custom script: call RemoveLocation (udg_CICpoint[2])
          • Custom script: call RemoveLocation (udg_CICspotinit)
        • Else - Actions
Thnx to Tinki3 for the Map
Report any bugs/leaks

Credit if used

-Dirac
 

DrEvil

FCRI Associate!
Reaction score
111
Nice
Unique
GUI
Not - MUI
Leaks


Create 1 BH Progectile for (Owner of Viking) at (CICspot offset by ((Cos(CICangle)) x (Distance between CICpoint[1] and CICpoint[2])) towards ((Angle from CICspot to CICpoint[1]) - (CICslide x (2800.00 / (Distance between CICpoint[1] and CICpoint[2])))) degrees) facing (((Angle from CICspot to (CICspot offset by ((Cos(CICangle)) x (Distance between CICpoint[1] and CICpoint[2])) towards ((Angle from CICspot to CICpoint[1]) - (CICslide x (2800.00 / (Distance between CICpoint[1] and CICpoint[2])))) degrees)) + 0.00) - 90.00) degrees


How comes you picked the chain to curve ?
at least MPI and Leak free - to get a shot at being approved

- Use points to remove the leaks.
- Offsets leak , set the offset to a variable
 

Dirac

22710180
Reaction score
147
> Use points to remove the leaks.
I know.
> Offsets leak , set the offset to a variable.
Create 1 BH Progectile for (Owner of Viking) at (CICspot offset by ((Cos(CICangle)) x (Distance between CICpoint[1] and CICpoint[2])) towards ((Angle from CICspot to CICpoint[1]) - (CICslide x (2800.00 / (Distance between CICpoint[1] and CICpoint[2])))) degrees) facing (((Angle from CICspot to (CICspot offset by ((Cos(CICangle)) x (Distance between CICpoint[1] and CICpoint[2])) towards ((Angle from CICspot to CICpoint[1]) - (CICslide x (2800.00 / (Distance between CICpoint[1] and CICpoint[2])))) degrees)) + 0.00) - 90.00) degrees
Fixed. Any other leak?
 

DrEvil

FCRI Associate!
Reaction score
111
facing (((Angle from CICspot to (CICspot offset by ((Cos(CICangle)) x (Distance between CICpoint[1] and CICpoint[2]))
Another offset leak :)

Apart from that i think its good and you should at least try to make this MPI.
 

DrEvil

FCRI Associate!
Reaction score
111
Where only 1 unit from each player can use the spell at any 1 time.
 

Trollvottel

never aging title
Reaction score
262
(Random 1 units from TempGroup) creates a group which has to be destroyed, also.
screenshots would be really nice
 

BlackRose

Forum User
Reaction score
239
I was kinda expecting something like Pudge Wars Meat Hook, but I'm guessing, that would be impossible in GUI, as I tried (but failed :p).

1) It is too fast!!
2) NO screenshots:

I decided to post one for you :) (is this ok with you?)

curvedicechainkr2.jpg
 

Dirac

22710180
Reaction score
147
> It is too fast!!
Im quoting myself...
it uses some complex formulas at it (some of them are hard to explain for me)
Creating formulas again will be hard, but not impossible, coming up on next version

>NO screenshots
Sorry about that, i tried to take some screenshots at it, but its pretty hard on Mac. Your screenshot looks good :thup:

>(Random 1 units from TempGroup) creates a group which has to be destroyed
Wait for the next version
 

mordocai

New Member
Reaction score
17
can you make a version that goes straight like your other meathook please:thup: i would +rep you but this sint exactly what i was looking for >> otherwise i like it. Im a fan of linear spells:rolleyes:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top