Spell Panda Hook

Andrewgosu

The Silent Pandaren Helper
Reaction score
715
Panda Hook

Unleashes a fiery chain of lightning from the Brewmaster, which pulls random targeted units towards the panda. When collided, the lightning chain breaks and stuns, deals damage to the targets.

I shall add more details later and better screenshots soon. Meanwhile, check it out.

122223.gif


12222.gif
 

Attachments

  • Panda_Hook_MadeByAndregosu_ver1.1.w3x
    30.4 KB · Views: 960

gref

New Member
Reaction score
33
Very nice. (+rep)

Note: It bugged a bit when a unit got netted behind two others -> it kept trying to pull that unit through.
 
Reaction score
65
Let me quess, this is for Pandamonium? ;)
Nice idea, by the way, maybe add a maxinum time it can last? (To prevent the bug gref pointed out)
 

gref

New Member
Reaction score
33
I had a dragging spell of some kind in an older map, I think I added a local variable that stored the previous location or coords and checked to see if the unit had moved a minimum distance on each move.
And if it didn't it meant it was stuck, so the ability triggered/cancelled.
 

Sooda

Diversity enchants
Reaction score
318
It' s really fun when they get stuck behind eachother so you can run away and then drag them where you want. Looks so natural. Only bug what I discovered was that its hotkey was "p" what is well also patrol hotkey, Andrew how you made so simple flaw :D Also "p" for hotkey isn' t wonderful I can' t reach from one keyboard end to another and it' s easier to just click on ability button. If it would be a really hotkey it would be Panda Hook. Good work still may you post your JASS also ? I forgot to mention that it is very smooth what is good.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
715
I know about the "units get stuck" bug. It can be avoided by turning the collision off for the unit and then on...It just looks so silly, when they get stuck, so I left it in.:p I think I'll add an option to toggle the collision on/off.

Yeh, sorry about the tooltip. I'll fix that asap.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Great spell, although the name is ugly :p
 

Tom Jones

N/A
Reaction score
437
Heh, this one is funny :D

I got some small notes though. Why are you using so many arrays? Your not using the arrays to anything at all, and overwritting the variable doesn't mean anything as long as you store it everytime. And when your using arrays, the used indexes has to be nulles. Anyways here it's a example of what I mean:

Code:
[B]    local unit tmpUnits
    local lightning tmpLightning
    local timer tmpTimer[/B]

    call GroupEnumUnitsInRange( g, xPos, yPos, PandaHook_TargetRadius(), filter )    
    loop
[B]        set tmpUnits = FirstOfGroup() [/B]
        exitwhen ( ([B]tempUnits[/B]== null) or (nIndex > level) )
        set tmpTimer = CreateTimer() 
        call SetHandleHandle( [B]tmpTimer[/B], "tmpUnit", [B]tmpUnits[/B])
        call SetHandleHandle( [B]tmpTimer[/B], "a", a ) 
        set xPos                 = GetUnitX([B]tmpUnits[/B])
        set yPos                 = GetUnitY([B]tmpUnits[/B])
[B]        set tmpLightning [/B]= AddLightning( PandaHook_LightingId(), true, x, y, xPos, yPos )
        call SetHandleHandle([B] tmpTime[/B], "tmpLightning", [B]tmpLightning[/B])
        call TimerStart([B] tmpTimer[/B], 0.03, true, function PandaHook_MoveTargets )
        call GroupRemoveUnit( g,[B] tmpUnits[/B])
    endloop

//  This is how arrays are nulled:
//  set nIndex = 1
//  loop
//      exithwen tmpTimer == null
//      set tmpUnits[nIndex] = null     
//      set tmpTimer[nIndex] = null
//      set tmpLightning[nIndex] = null
//      set nIndex = nIndex+1
//  endloop

[B]    set tmpUnits = null
    set tmpLightning = null
    set tmpTimer = null[/B]
Also the JESP standard requires you to have the spells name in all stored values name, etc. call SetHandleHandle(*SomeHandle*,"PandaHook_u",u), but since your storing on a local created object, it doesn't matter much in my opinion (Which is one of the reasons why I don't support the standard). However if you were storing on a unit, it suddenly becomes important to distinct between the stored values, so you don't accidently overwrite a value stored from another function (Which has nothing to do with the standard, it's common sense).
 

Sim

Forum Administrator
Staff member
Reaction score
534
Great spell!

I once heard Vex mention the fact that the Configuration header must contain formulaes that include a "level" factor. Yours only include raw numbers.

Also,

Code:
constant function PandaHook_TargetUnits takes integer level returns integer
    //The maximum amount of targets the lightning can pull depending on level of the "Panda Hook". Change to your needs or add even more levels.
    if     ( level == 1 ) then
        return 3
    elseif ( level == 2 ) then
        return 6
    elseif ( level == 3 ) then
        return 9
    endif
    return 0
endfunction

Should be simply

Code:
constant function PandaHook_TargetUnits takes integer level returns integer
    //The maximum amount of targets the lightning can pull depending on level of the "Panda Hook". Change to your needs or add even more levels.
    return 3 * level
endfunction

Same with every other configuration constant function you have below. Add a " * level" formulae.

Other than that... Thumb up!
 

pheonixashes

Those who misplace trust in gods learn their fate.
Reaction score
65
w00t! Pandas!!!

Anyway, cool spell, seems smooth an such.

+reppity rep.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
JASS? or GUI?

even if JASS or GUI it is still nice +rep if i can?

Lol... You can look. :p It is JASS though btw. :D

Anyways, this is a great spell, but still, the stuck effect, but it is great. I kinda like the stuck effect, it is funny. If you turned off collision, wouldn't the units kind of run through eachother, or? +reppy, rep, reputation... :D
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
715
Thanks for the massive feedback!

I had to configure the spell a little bit, the real version I am using needs arrays. I'll udate this version not use arrays, thanks for pointing that out. ;) (+ the JESP standard naming)


Daxtreme, the "switch" function for the levels is there for readability and easier configuration. Maybe someone wants to change the targets for level 1 to 4, level 2 for 13 and 24 for level 3. ;)

Oh, I realized the name resembles Meat Hook. It was unintantionally. :p
 

Sim

Forum Administrator
Staff member
Reaction score
534
Yes, but Vex clearly stated that a JESP spell must be able to hold any number of levels, using formulas. I wouldn't like to add 17 * 2 lines of JASS code just so my spell can have 20 levels!
 

Sim

Forum Administrator
Staff member
Reaction score
534
Don't worry, as long as they're in the Spells awaiting approval thread you don't need to bump the spells ;)

Approved.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top