Spell Panda Hook

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
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: 971

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
716
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
716
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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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