System Impale System

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Maybe some users want to use locations and there is no location use in the code except in the usable functions.
Locations are not recommended. You can see it in Jass help section, we recommend XY very hard.
Diffrence?
Destroying handles when they are running will cause handle stack corruption. GroupUtils simply recycles them. If you hate GroupUtils, use Recycle.
What?
XE is just making the thing hard.
Good or bad?
Does not follow the naming rules.
If you read it, you can see it saves the real that is in the hashtable h in I[Loop2] of Loop2 + (SquareRoot(height[Loop2]) * 2.00) / (airtime[Loop2] / INTERVAL). Why should it use arrays?
Why not just making it struct ?
 

Deaod

Member
Reaction score
6
Maybe some users want to use locations and there is no location use in the code except in the usable functions.
You dont need to support the madness of dumb users. Locations have exactly ONE use nowadays and this use is not applied in this script, or will be in any related script.

Diffrence?
Not recycling groups, thus leaking a good deal of data over time. Also, IIRC, there was a way to optimize the number of groups used. I think you could store all units affected by the stun into a single global group.

Instead of typing in "Abilities\\Spells\\Undead\\Impale\\ImpaleMissTarget.mdl" all the time they could just use SPIKE_SFX. Simple.
Thats not your problem. If its a default effect a user could somehow change, thatd be different. But then it wouldnt have to be a public constant.

Use resources already available, xe provides you with a dummy unit and other constants you might want to use.

Good or bad?
Bad.

Why should it use arrays?
Because you can store all units currently in the air inside a one-dimensional array. You also dont need to use groups to iterate over all units in mid-air.

How should I do it then?
Either find a library with a stack for such functions (the same applies to ShowUnit and PauseUnit), or avoid using those functions at all.

What references?
Unit references (local unit u).

Diffrence?
Room for one additional instance (though you will likely never reach the case where youll need it). Other than that, its bad style. Arrays start at 0.

What is wrong with the name it already has?
IMPS doesnt tell me what it does. Name it ImpaleTemplate or whatever and users reading requirements of spells or other libraries will know what it does.
Using public functions breaks the WC3 convention of not using underscores inside function names.

If you read the other posts, they say I should remove all BJs.
Yeah, i know. Its a load of bullshit. Why remove a BJ when you cant replace it with code that is more efficient (no, optimizing a function call is not something you should care about)? Plus, you lose a bit of readability because you replace a function called CountUnitsInGroup with something looking like this:
JASS:
        set bj_groupCountUnits = 0
        call ForGroup(G[Loop2],function CountUnits)
Tell me, what tells you more directly what that part of code does?

Maybe you're right, but I wanted to not be needed to use other systems.
Yeah, then dont write libraries, please. Libraries are meant to be used. Not to be avoided. Theres absolutely nothing bad about modularity or code reuse.
But that wasnt my main point. You could for example have used a dummy Storm Bolt ability and removed the stun buff after a certain time yourself. WAY better stunning.

Destroying handles when they are running will cause handle stack corruption. GroupUtils simply recycles them. If you hate GroupUtils, use Recycle.
No. Thats not it.
 

BloodySkullz

Active Member
Reaction score
10
There is an issue when you impale flying units, or units with fly height. They get stuck there. Other than that, it is very well done.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    Starting this upcoming Thursday, I will be in Japan for 10 days.
  • tom_mai78101 tom_mai78101:
    Thursday - Friday will be my Japan arrival flight. 9 days later, on a Sunday, will be my return departure flight.
    +2
  • The Helper The Helper:
    Hope you have safe travels my friend!
    +1
  • vypur85 vypur85:
    Wow spring time in Japan is awesome. Enjoy!
  • The Helper The Helper:
    Hopefully it will be more pleasure than work
  • vypur85 vypur85:
    Recently tried out ChatGPT about WE triggering. Wow it's capable of giving a somewhat legitimate response.
  • The Helper The Helper:
    I am sure it has read all the info on the forums here
  • The Helper The Helper:
    i think triggering is just scripting and chatgpt is real good at code
  • vypur85 vypur85:
    Yeah I suppose so. It's interesting how it can explain in so much detail.
  • vypur85 vypur85:
    But yet it won't work.
  • The Helper The Helper:
    it does a bad ass job doing excel vba code it has leveled me up at my job when I deal with excel that is for sure
  • vypur85 vypur85:
    Nice! I love Excel coding as well. Has always been using Google to help me. Maybe I'll use ChatGPT next time when I need it.
  • The Helper The Helper:
    yeah whatever it puts out even if it is not perfect I can fix it and the latest version of chatgpt can create websites from pictures it will not be long until it can do that with almost all the tools
    +1
  • The Helper The Helper:
    These new Chat AI programs are going to change everything everyone better Buckle the Fuck Up!
  • The Helper The Helper:
    oh and Happy Tuesday Evening! :)
    +1
  • jonas jonas:
    Im worried they'll change things for worse
  • jonas jonas:
    A lot more low quality content, a lot more half-baked stuff.
  • jonas jonas:
    If you're good enough to spot the mistakes of the answers you don't need it in the first place. If you aren't good enough, you're gonna rely on some half-correct stuff
  • The Helper The Helper:
    the earlier AI is and has been used extensively for publishing news and other content for a while now
  • jonas jonas:
    I used to be active on quora, it's now flooded with extremely similar, superficial answers that often miss the point of the question
  • N NJJ:
    hi
  • N NJJ:
    Hello, gathering all my old accounts… :)
    +1
  • The Helper The Helper:
    by all means gather it all up!

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top