1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  3. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. 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.

[vJass] (system) Missile

Submitted by Anachron
This bundle is marked as approved. It works and satisfies the submission rules.
I have worked on this missle engine for 2 months now and start the first official beta today.

Please post feedback, critism, pros, cons, bugs, etc.
Thanks all for your patience!

And thanks for downloading.
Preview image by Furby. Thanks a lot!

Edit:
I've updated the testmap and added a second spell.
There is a lot of improvements in version 0.1.7 and I plan to make it even faster and even more modular. I also plan to create an easy to understand API.

Used librarys:

Changelog for 0.1.7

Changed all constants (TRUE, FALSE) to true/false
Changed interval to 0.03125
Fixed object leaks
Performance improvements on MissileMovement: Less object generation
Merged MissileLocHelpers to Missile<type>Target
Removed HomingMissile wrapper
Added second spell (Rain of Fire)
Removed Libraries from Modules


ChangeLog for 0.1.4

Changed name to Missile.
Completely remade in modules, supports now a lot of optional stuff.
Added SpellHelper, fixed a lot of problems, made the Miranas Arrow example WAY more powerful to show what this system is able to be capable of.


Keywords:
Missile, Projectile, xe, xemissile, xecollider, projectile, collider, awesome, anachron, collide, colliding, vJass
Contents

CustomMissile 0.1.7 (Map)

Reviews
Moderator
BPower: 11:02, 25th Feb 2016 Reason for re-review: Nowadays the spell section is packed full of missile systems from different authors, therefore a more qualified moderator comment than "this is neat stuff" is required. There is keen...
  1. Axarion

    Axarion

    Joined:
    Sep 30, 2009
    Messages:
    675
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I have a suggestion for your system: Maybe add an event or something that allows the user of your system to reflect or block missiles from outside the missiles struct. Hope you like that idea, I think it's possible to do that :) Oh and besides great system :)
     
  2. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Yes, I was already thinking about how to make such things.
    The idea is great, but I need to think about the best way to do such things.

    I'll probably make an function to get all missiles in an area so you'll be able to manipulate all the missiles you need to :)
     
  3. Axarion

    Axarion

    Joined:
    Sep 30, 2009
    Messages:
    675
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Yeah that would be nice. Another method would be to use Event and fire that event when a missile hits, collides etc. I made such a reflection once in a self-made missile system, but that sucked cause of the dummys facing D:
     
  4. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    I don't get it.
    You already have methods that fire when missile units something?
     
  5. Axarion

    Axarion

    Joined:
    Sep 30, 2009
    Messages:
    675
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I am using a custom library named Event that allows to create your own event and to attach structs to these events.
    So you can just create a event that you can fire whenever you want

    Code (vJASS):
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //  ~~    Event     ~~    By Jesus4Lyf    ~~    Version 1.04    ~~
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //
    //  What is Event?
    //         - Event simulates Warcraft III events. They can be created,
    //           registered for, fired and also destroyed.
    //         - Event, therefore, can also be used like a trigger "group".
    //         - This was created when there was an influx of event style systems
    //           emerging that could really benefit from a standardised custom
    //           events snippet. Many users were trying to achieve the same thing
    //           and making the same kind of errors. This snippet aims to solve that.
    //
    //  Functions:
    //         - Event.create()       --> Creates a new Event.
    //         - .destroy()           --> Destroys an Event.
    //         - .fire()              --> Fires all triggers which have been
    //                                    registered on this Event.
    //         - .register(trigger)   --> Registers another trigger on this Event.
    //         - .unregister(trigger) --> Unregisters a trigger from this Event.
    //
    //  Details:
    //         - Event is extremely efficient and lightweight.
    //         - It is safe to use with dynamic triggers.
    //         - Internally, it is just a linked list. Very simple.
    //
    //  How to import:
    //         - Create a trigger named Event.
    //         - Convert it to custom text and replace the whole trigger text with this.
    //
    //  Thanks:
    //         - Builder Bob for the trigger destroy detection method.
    //         - Azlier for inspiring this by ripping off my dodgier code.
    //
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    library Event
        ///////////////
        // EventRegs //
        ////////////////////////////////////////////////////////////////////////////
        // For reading this far, you can learn one thing more.
        // Unlike normal Warcraft III events, you can attach to Event registries.
        //
        // Event Registries are registrations of one trigger on one event.
        // These cannot be created or destroyed, just attached to.
        //
        // It is VERY efficient for loading and saving data.
        //
        //  Functions:
        //         - set eventReg.data = someStruct --> Store data.
        //         - eventReg.data                  --> Retreive data.
        //         - Event.getTriggeringEventReg()  --> Get the triggering EventReg.
        //         - eventReg.destroy()             --> Undo this registration.
        //
        private keyword destroyNode
        struct EventReg extends array
            integer data
            method clear takes nothing returns nothing
                set this.data=0
            endmethod
            method destroy takes nothing returns nothing
                call Event(this).destroyNode()
            endmethod
        endstruct
       
        private module Stack
            static thistype top=0
            static method increment takes nothing returns nothing
                set thistype.top=thistype(thistype.top+1)
            endmethod
            static method decrement takes nothing returns nothing
                set thistype.top=thistype(thistype.top-1)
            endmethod
        endmodule
       
        private struct EventStack extends array
            implement Stack
            Event current
        endstruct
       
        struct Event
            private trigger trig
            private thistype next
            private thistype prev
           
            static method getTriggeringEventReg takes nothing returns EventReg
                return EventStack.top.current
            endmethod
           
            static method create takes nothing returns Event
                local Event this=Event.allocate()
                set this.next=this
                set this.prev=this
                return this
            endmethod
           
            private static trigger currentTrigger
            method fire takes nothing returns nothing
                local thistype curr=this.next
                call EventStack.increment()
                loop
                    exitwhen curr==this
                    set thistype.currentTrigger=curr.trig
                    if IsTriggerEnabled(thistype.currentTrigger) then
                        set EventStack.top.current=curr
                        if TriggerEvaluate(thistype.currentTrigger) then
                            call TriggerExecute(thistype.currentTrigger)
                        endif
                    else
                        call EnableTrigger(thistype.currentTrigger) // Was trigger destroyed?
                        if IsTriggerEnabled(thistype.currentTrigger) then
                            call DisableTrigger(thistype.currentTrigger)
                        else // If trigger destroyed...
                            set curr.next.prev=curr.prev
                            set curr.prev.next=curr.next
                            call curr.deallocate()
                        endif
                    endif
                    set curr=curr.next
                endloop
                call EventStack.decrement()
            endmethod
            method register takes trigger t returns EventReg
                local Event new=Event.allocate()
                set new.prev=this.prev
                set this.prev.next=new
                set this.prev=new
                set new.next=this
               
                set new.trig=t
               
                call EventReg(new).clear()
                return new
            endmethod
            method destroyNode takes nothing returns nothing // called on EventReg
                set this.prev.next=this.next
                set this.next.prev=this.prev
                call this.deallocate()
            endmethod
            method unregister takes trigger t returns nothing
                local thistype curr=this.next
                loop
                    exitwhen curr==this
                    if curr.trig==t then
                        set curr.next.prev=curr.prev
                        set curr.prev.next=curr.next
                        call curr.deallocate()
                        return
                    endif
                    set curr=curr.next
                endloop
            endmethod
           
            method destroy takes nothing returns nothing
                local thistype curr=this.next
                loop
                    call curr.deallocate()
                    exitwhen curr==this
                    set curr=curr.next
                endloop
            endmethod
            method chainDestroy takes nothing returns nothing
                call this.destroy() // backwards compatability.
            endmethod
        endstruct
       
        /////////////////////////////////////////////////////
        // Demonstration Functions & Alternative Interface //
        ////////////////////////////////////////////////////////////////////////////
        // What this would look like in normal WC3 style JASS (should all inline).
        //
        function CreateEvent takes nothing returns Event
            return Event.create()
        endfunction
        function DestroyEvent takes Event whichEvent returns nothing
            call whichEvent.chainDestroy()
        endfunction
        function FireEvent takes Event whichEvent returns nothing
            call whichEvent.fire()
        endfunction
        function TriggerRegisterEvent takes trigger whichTrigger, Event whichEvent returns EventReg
            return whichEvent.register(whichTrigger)
        endfunction
       
        // And for EventRegs...
        function SetEventRegData takes EventReg whichEventReg, integer data returns nothing
            set whichEventReg.data=data
        endfunction
        function GetEventRegData takes EventReg whichEventReg returns integer
            return whichEventReg.data
        endfunction
        function GetTriggeringEventReg takes nothing returns integer
            return Event.getTriggeringEventReg()
        endfunction
    endlibrary
     
  6. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Seems fine, I'll think about it :)
     
  7. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    Why do you use an unnecessary module? Especially in private syntax.
     
  8. lelyanra

    lelyanra

    Joined:
    Sep 4, 2007
    Messages:
    380
    Resources:
    25
    Icons:
    25
    Resources:
    25
    seems interesting, but i gotta restudy your system o_O (I was creating me stuff which now does not work xD)

    Edit: fixed, you just changed a lot of words in it.

    _______________________________________

    Code (vJASS):
            //: == ---------------------------- ----------------------------
            //: #  Methods - Setting / Getting of members
            //: == ---------------------------- ----------------------------
            public method isUnitHit takes unit u returns boolean
                return IsUnitInGroup(u, .enumGroup)
            endmethod
           
            public method hitUnit takes unit u returns nothing
                call GroupAddUnit(.enumGroup, u)
            endmethod
           
            public method unhitUnit takes unit u returns nothing
                call GroupRemoveUnit(.enumGroup, u)
            endmethod


    why this? isn't it better to manually pick a group from the grouputils stack and release it at onEnd?

    you did this to avoid multiple hits in the same unit?

    ______________________________________

    Important

    wtf, this sytem NEEDS a better and (mostly a) more updated review from the moderators, this one is really old and does not match the current state of the system O.O. The way it is it just seems negative advertising (gives an untruthfull impression of the system), which is unfair. did you try to talk to some moderator? also the "not rated" stuff is unfair aswell.

    (btw, just exercising freedom of speech, that's just my opinion, not trying to offend anyone)

    ________________________________

    plz include documentation on how the haze values works. i cannot seem to make it work =( (i though the .hasHaze was never being set to true, even if i imput haze values different from 0)
     
    Last edited: May 3, 2010
  9. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    I did this so users can manually add/remove hit units.
    I don't want the user to be able to destroy the group.

    Yes, I talked to Ralle and The_Reborn_Devil, while Ralle is against me and says I should wait, TRD shares my opinion.

    Shit, I forgot to remove that. Sorry, I'll change it on next update.
     
  10. Axarion

    Axarion

    Joined:
    Sep 30, 2009
    Messages:
    675
    Resources:
    1
    Spells:
    1
    Resources:
    1
    As you see the library event wasn't made by myself ;) It was made by Jesus4Lyf (the system says that) so it is not my fault ^^
     
  11. Vengeancekael

    Vengeancekael

    Joined:
    Aug 11, 2009
    Messages:
    5,740
    Resources:
    16
    Tools:
    1
    Maps:
    13
    Spells:
    1
    StarCraft II Resources:
    1
    Resources:
    16
    aaaaaaaa so many typos in the "history" :p Also where's Version k? you jumped from j to l. The changes look like a lot of work.
     
  12. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    K was a private test version only, while it has/had 50% of the new code.
    I decided to not release it and to make a jump.

    Sorry for the typos, I am quite fast writing the history.
     
  13. jingkeet

    jingkeet

    Joined:
    May 5, 2010
    Messages:
    6
    Resources:
    0
    Resources:
    0
    errr,i am new here n im trying to make my own map with some for your model n spells but i cant seem 2 open the spell tat i download.so can some1 tell me how plsssss:cry::cool:
     
  14. jingkeet

    jingkeet

    Joined:
    May 5, 2010
    Messages:
    6
    Resources:
    0
    Resources:
    0
    errr,i am new here n im trying to make my own map with some for your model n spells but i cant seem 2 open the spell tat i download.so can some1 tell me how plsssss
     
  15. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    I am thinking about deleting the resource and reuploading...
    People are scared because of the bad review.
     
  16. lelyanra

    lelyanra

    Joined:
    Sep 4, 2007
    Messages:
    380
    Resources:
    25
    Icons:
    25
    Resources:
    25
    i agree with that. the review is absurd and is gives a bad image of you (or triggerhappy for those who use your system and notice he's just being REALLY unfair (not mentioning the adjectives he deserves but would just grant me reputation penalty)) (again, not offending, just exercising freedom of speech)
     
  17. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Hm I really don't know what I should do.
    Lelyanra, do you have any suggestions?
     
  18. lelyanra

    lelyanra

    Joined:
    Sep 4, 2007
    Messages:
    380
    Resources:
    25
    Icons:
    25
    Resources:
    25
    have you talked to ralle? if you have you can delete this thread (which would hurt) and reupload, that would maki you r system just to be "pending" but would delete all the posts... You might aswell put a warning in your first post in this thread, saying that the review is completelly outdated and the moderator refuses to give you a new one (that's just a fact). I don't think he can punish you for that.
     
  19. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Yes I've talked to ralle, he is on TH side.
    I already to -rep because I asked trigger to review it again.
    I have already put a notice in the first comment about the review being outdated.
     
  20. lelyanra

    lelyanra

    Joined:
    Sep 4, 2007
    Messages:
    380
    Resources:
    25
    Icons:
    25
    Resources:
    25
    I think that's all you can do =(

    try asking when trigger happy are going to make it. or you can just make a poll (as protest) and ask users when trigger happy are going to review it. i think th will start moving when a lot of users start asking stuff.