1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  3. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  4. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  5. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  6. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  7. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Distributor v1.0a

Submitted by JC Helas
This bundle is marked as pending. It has not been reviewed by a staff member yet.

Distributor v1.0a



Description




Author's note


Credits


Changelog




How to Import





The spell pack is 100% configureable.

Previews
Contents

Just another Warcraft III map (Map)

  1. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,532
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    You should explain what "Distributor" actually is, as there's currently no description.
     
  2. JC Helas

    JC Helas

    Joined:
    Oct 19, 2014
    Messages:
    126
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Im very sorry i forgot, anyway boo i miss you, welcome back

    Edited:
    Hope that description is enough
     
    Last edited: Dec 31, 2019
  3. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    1,418
    Resources:
    3
    Spells:
    2
    Tutorials:
    1
    Resources:
    3
    Gadzooks, from the gif this looks awesome!

    Edit: rather confusing on what it does, but from my understanding the orbiting missile sap their respective type from enemy units it passes through and then stops where it is when it's full?
     
    Last edited: Dec 31, 2019
  4. JC Helas

    JC Helas

    Joined:
    Oct 19, 2014
    Messages:
    126
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Sorry if the vjass compilation was old style, i still rely on struct allocator and deallocator, but i was planning to convert everything into zinc with custom create/destroy method XD

    Buuuut as for now, i will let this vjass for a main time
     
  5. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,533
    Resources:
    9
    Models:
    1
    Icons:
    2
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    9
    This is quite the eye-candy for a spellpack, I must say. However, optimizations and such are still possible. A lot needs to be said, but I can't say them all at once, so I've left it in spoilers.

    • The function
      DistanceBetweenXY
      can be optimized to return the square of the distance (not bothering with square root). That way, it would be less CPU-intensive to call this function in a loop.

    • In struct
      DISTRIBUTOR_dummy

      • In static method
        Death
        • The if-condition
          GetUnitTypeId(u)==DUMMY_ID
          can be replaced with a hashtable
          HaveSavedHandle(hash, GetHandleId(u), 0)
          check instead. This further ensures that only dummy units created for the class/struct will correctly proceed to the next step.
        • Setting a field value (of a hashtable entry) to null before removing that entry from the hashtable is redundant.
          SaveEffectHandle(hash, id, 0, null)
          before
          RemoveSavedHandle(hash, id, 0)
          .
    • In struct
      createballs

      • In static method
        onCast
        • Having to use the same parent key to store different types would be more difficult to troubleshoot when something goes wrong with the spellpack (internally or externally). In this case, using 0 as a parent key to store both integers (unit types) and handles (groups) will cause some sort of confusion as to whether to treat the entry as an integer or as a handle.

     
    Last edited: Jan 9, 2020
  6. JC Helas

    JC Helas

    Joined:
    Oct 19, 2014
    Messages:
    126
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3

    DistanceBetweenXY


    Hehehe about square of distance XD i havent master that formula, how i wish I could easily understand them XD , as for now by reading Vexorian's tutorial, unexpectedly that formula was there, XD but I'll try my best,, blabla nvm bro

    Death Condition


    Thanks maan for making me aware of

    Finaly the

    Parent's key


    Probably if you will ask my opinion, my theory, i think they are in different section
    By just looking the RemoveSaved$TYPE$
    Maybe its a clue XD

    Edit:Ah the square of distance that 10 is equal to 100? XD okay got it, honeslty i hate that formula, i dont know why

    Edit:

    DitanceBetweenXY


    Code (vJASS):

      private function DistanceBetweenXY takes real x1,real y1,real x2,real y2 returns real
            local real dx=x2-x1
            local real dy=y2-y1
            return dx*dx+dy*dy
        endfunction
    /*--------------------------------------------------------------------*/
                            set r=DistanceBetweenXY(x,y,xd,yd)
                            if r>((dist*dist)/2.0) then
                                set deg=bj_RADTODEG*Atan2(y-yd,x-xd)
                            elseif r<((dist*dist)/2.0) then
                                set deg=bj_RADTODEG*Atan2(yd-y,xd-x)
                            endif
     


    Death Condition


    How about this, I load the unit that was being save to dummy's parent by the key of 1 because key 0 had the attached effect to dummies so no way to save them in the same key because they are in handle section then I load the saved group by the parent of loaded unit from dummy's parent.
    Code (vJASS):
    GetUnitTypeId(u)==DUMMY_ID and IsUnitInGroup(u,LoadGroupHandle(hash,GetHandleId(LoadUnitHandle(hash,id,1)),0))
     
    Last edited: Jan 9, 2020
  7. Archaos

    Archaos

    Joined:
    Sep 26, 2020
    Messages:
    23
    Resources:
    0
    Resources:
    0
    lol this is pretty cool, however im having a problem, it is crashing when using the life and mana distributor on enemies, and usually happen after a few uses of the skills initially, and then something doesn't seem quite about the reunion, is anybody else having problems too or is just me? xD

    Update; Ive discovered the one problem im having, is when the unit you cast the mana or life distributor on dies before the distributor can finish, it seems to get stuck following you in an attack form i suppose ill call it, and never become usable by another spell, walking through a group of enemies cause the distributors non stop attack anything is passes through lol and they do not time out either, i believe too the same is happening when using reunion when they come back to you, same kind of stuck but following you deal cant quite remember if those ones timed out but i think so.

    Update2; fixed my problem, however the reunion skill does not function and also does not in your test map running it in reforged. Any ideas on why and how to fix?
     
    Last edited: Oct 7, 2020