System Impale System

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
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
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
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.
  • Varine Varine:
    Eh, whatever. Thanks for listening guys
  • jonas jonas:
    Sure :) Let us know how it ends
  • Varine Varine:
    All of these things will end happily, they're just stressful. And I still lack many good friends that I can go to, and the ones I can are preoccupied with similar things. Thus general chit chat, cuz for some reason TH and Ghan and Tom all actively keep it up.
  • Varine Varine:
    Just gotta keep Miss Mazie up through the week until her shock wears off and she realizes that she still has family all around her, and bossman will do whatever he's going to do and I'll respond appropriately when it happens. Thank you all for the support, I do very much appreciate everyone being here for me through the years
    +3
  • vypur85 vypur85:
    Best of luck Varine!
  • vypur85 vypur85:
    I just gotten myself an offer to work in China. The pay quadruples my current one. Damn.... Not really ready to start a new life there in China.
  • The Helper The Helper:
    I have heard that they pay pretty good to English teachers in China - you would be an expat
  • jonas jonas:
    Cool, what kind of job?
  • Accname Accname:
    I would be careful with jobs in China. They can be hit and miss depending on where in China you go. Places like hong kong / Shengzen / Beijing can be neat. Other places not so much.
  • Accname Accname:
    I would recommend searching for some first person experiences for the city you got the offer in. Especially now when the political situation in China is deteriorating.
  • jonas jonas:
    Accname, long time no see
  • jonas jonas:
    What have you been up to
  • tom_mai78101 tom_mai78101:
    Hey Accname, welcome back.
  • Accname Accname:
    Not much. Working in the Renewable Energy Sector as an IT Consultant. Its okay, but I think I preferred working at the university. It was more relaxed and you met all kinds of crazy people there.
  • vypur85 vypur85:
    I gotten a teaching position for Biology in a college in Wuhan (yes, there)... I suppose it should be fine there (I hope). Many of my ex colleagues are teaching in China as well currently (none in Wuhan though)
  • vypur85 vypur85:
    And I signed the contract already. I guess there's no turning back....
  • jonas jonas:
    @Accname how many hours do you work? I heard in some sectors IT consultants rack up insane hours
  • jonas jonas:
    @vypur85 sounds nice, have fun : )
  • Accname Accname:
    I am supposed to work 40 hrs a week, but I can work more if I like and I will be paid for those hours (as long as I don't go too far, there are laws and company policies, etc)
  • Accname Accname:
    In practice its basically work as much as you like, as long as the job gets done in time.
  • jonas jonas:
    Haha, my job is like that as well... that usually means I have a few 70-80 hours weeks a year, and lots of 20 hours weeks...
  • jonas jonas:
    a few weeks ago, one of my friends basically said "jonas, I received an invitation to submit something to conference X but I'm too lazy to do it and also the conference isn't advanced enough for my high level of research*, why don't you write something? Oh by the way, the deadline is in two weeks. Enjoy!" so I got two 80 hour weeks out of that kind offer. (*of course he didn't say those parts, but it's a better story this way)
  • jonas jonas:
    now I'll have next week off to make up for overtime :p and I'll play some good old gothic 2
  • The Helper The Helper:
    Hope you are enjoying that gothic 2~
  • jonas jonas:
    Heck yeah :cool: It's unfortunate that the game series wasn't generally well received outside of Europe, but it seems they want to remake Gothic 1 now. I'm very excited but also very scared at the same time. I hope they won't pull a reforged

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top