1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Ride into the sunset with the 32nd Modeling Contest.
    Dismiss Notice
  5. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  6. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    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,265
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    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,159
    Resources:
    2
    Spells:
    2
    Resources:
    2
    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,362
    Resources:
    7
    Models:
    1
    Icons:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    7
    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