1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. And she's bought a stairway to heaven. The 6th Special Effect Contest Results are here.
    Dismiss Notice
  3. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  4. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  5. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  6. 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. 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 tried but all seem to be on TriggerHappys site (from the mods, normal users agree with me).

    I guess it's never reviewed.
     
  2. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    Well considering he's been reviewing the spells from the contest for over 2 weeks (which is way too long) it's safe to say he's not fit to be a moderator, so there's not much you can do. If it is going to take TriggerHappy several weeks to sift through spell contest submissions and even longer just to change an outdated review then it's safe to say he's not fit to be a moderator, and he cannot tend to his responsibilities in due time.

    Just because it's volunteer work doesn't mean that he should be able to take months to complete a simple review of a demo-map. If he cannot tend to the responsibilities that present themselves as expected then he is incapable of being a moderator. It's only going to hurt THW's reputation.
     
  3. 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, and I can't see a reason why Ralle is defending him.
     
  4. lelyanra

    lelyanra

    Joined:
    Sep 4, 2007
    Messages:
    380
    Resources:
    25
    Icons:
    25
    Resources:
    25
    In my opinion, he's could review it in due time. I just think he's lazy or trying to punish anachron for asking him to review it (like "pride-vegence"). either way, being lazy or childish, it's just not approppriate for a moderator.
     
  5. 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
    The next version is coming with a new system (So I'll have to delete this resource) because it's included in CustomAttack and its easier to handle it inside the other system.

    It will feature a new dummy system and a hell easier and faster interface.
     
  6. lelyanra

    lelyanra

    Joined:
    Sep 4, 2007
    Messages:
    380
    Resources:
    25
    Icons:
    25
    Resources:
    25
    naiz! =)
     
  7. Furby

    Furby

    Joined:
    Feb 18, 2008
    Messages:
    69
    Resources:
    1
    Icons:
    1
    Resources:
    1
    I hope we will still be able to use projectile system separately.

    Also, your projectiles appears to have no pitch? =/ Which kinda sucks, cuz I wanted to use it as replacement of normal unit missiles. Maybe I just missed something? I like that your arcs works even when unit stands on higher position than target. (as far as I remember it does)

    I'm currently using Kenny's projectiles system (from TH), where arcs don't work in situations like that.

    Hope you'll finish it soon.

    All best. Furby.
     
  8. 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 it does.

    Sure it will, but you can find the latest missile system version in there.

    What a shame.

    Yes, me too. Thanks for the feedback.
     
  9. Furby

    Furby

    Joined:
    Feb 18, 2008
    Messages:
    69
    Resources:
    1
    Icons:
    1
    Resources:
    1
    The Screenshot
    [​IMG]


    The Code
    This is just to show the problem, don't judge the code
    Code (vJASS):
    scope fail initializer init
    globals
        private trigger DMG = CreateTrigger()
    endglobals

        private struct projecMissile extends CustomMissile
           
            private unit source = null
            private unit aim = null
           
            public static method new takes unit caster, unit theTarget returns thistype
                local real x = GetUnitX(caster)
                local real y = GetUnitY(caster)
                local thistype this = thistype.create(x, y, GetLocZ(x, y) + 85., 0.)
               
                set .source = caster
                set .aim = theTarget
               
                call .setTargetUnit(theTarget)
                //call .setTargetUnitPos(theTarget)
               
                return this
            endmethod
           
            method onCreate takes nothing returns nothing
                set .sfx        = "Abilities\\Weapons\\Arrow\\ArrowMissile.mdl"
                set .scale      = 1.   //: 55% of the normal size
                set .colorA     = 255   //: Half transparent
                set .moveSpeed  = 900.  //: Moves with a rate of 512
                set .turnSpeed  = 0.15  //: Turns with a rate of 0.15
                set .hitRange   = 48.   //: Hits units and missles in range of 48.
                set .xyArc      = 0.0  //: Has an xyArc of 0.45
                set .zArc       = 0.15  //: Has an zArc of 0.45
                set .decay      = 6.    //: Decays after 6 seconds.
                set .h          = 50.   //: Has a height of 50.
                set .hitsUnits  = true  //: Hits units
            endmethod
           
            method onTargetReach takes nothing returns nothing
                call DisableTrigger(DMG)
                call UnitDamageTarget(.source, .aim, 10., false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
                call EnableTrigger(DMG)
                call .destroy()
            endmethod
        endstruct


        private function lol takes nothing returns nothing  
            local projecMissile missile = 0
            if GetUnitTypeId(GetEventDamageSource()) == 'earc' then
                set missile = projecMissile.new(GetEventDamageSource(),GetTriggerUnit())
            endif
        endfunction


        private function init takes nothing returns nothing
            call Damage_RegisterEvent(DMG)
            call TriggerAddAction(DMG, function lol)
        endfunction
    endscope


    What am I doing wrong? There's no pitch, looks unnaturally. :(
     
  10. 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 haven't added pitch yet, it will be there in the next release, sorry.
     
  11. Furby

    Furby

    Joined:
    Feb 18, 2008
    Messages:
    69
    Resources:
    1
    Icons:
    1
    Resources:
    1
    Ooh.. okay. I thought I just forgot to add some line to the code.

    Okay, I will wait for your update cuz my current projectile system is killing me, no-arc looks fugly on catapults. =/
     
  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
    Yes, the most missile engines are either having no functionality or functionality that disables other functionality. (Or even more worse, things that can be enabled once and not be disabled again).

    I am trying to make things optional but still useable and disableable at any time.
     
  13. Furby

    Furby

    Joined:
    Feb 18, 2008
    Messages:
    69
    Resources:
    1
    Icons:
    1
    Resources:
    1
    That's exactly what I'm looking for. Can't wait. :grin:
     
  14. 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 will release a beta of my CustomAttack engine next week.
    Make sure to check the thread since CustomMissile will fully be implemented there and not downloadable without CustomAttack anymore.

    This does not make things easier for me, but also for the users.
     
  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
    Update - 0.0.N

    0.0.N

    • Remade a lot of the engine.
    • Added a dummy engine. Missiles now have to be actived with .use.
    • You can now clone missiles. That is why I made the dummy engine.
    • You can now enumerate missiles.
    • Fixed the math functions The_Reborn_Devil told me to fix. Thanks.
    • The effect unit isn't an hero any longer.
    • A lot of fixes have been added to the whole system.
    • You can now load/save missiles easily with CustomMissile.load(HandleIdOfMissile) and Instance.save()
    • Very much new updates, I don't remember everything.


    Update - 0.1.0

    0.1.0

    • Fixed a few small stuff.


    Fixed.

    Fixed.


    Later =)

    Also thanks to Furby for the new preview image.
     
  16. 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
    Update - 0.1.2

    0.1.2

    • Added .zAngle
    • Fixed collision bug
    • Tons of other bug fixes
    • Rewritten of code areas
    • Increased efficiency
     
  17. Cihparg

    Cihparg

    Joined:
    Jul 4, 2008
    Messages:
    958
    Resources:
    1
    Models:
    1
    Resources:
    1
    Nice that you can shoot under ground with this thing...
    And the missiles go under ground.
     
  18. 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, thanks, I like it as well :D
     
  19. Axarion

    Axarion

    Joined:
    Sep 30, 2009
    Messages:
    675
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Gratz for second DC :) best missile system i have seen so far
     
  20. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    Okay, well I gave this thing a look and I still have to say I like mine better.

    When your projectiles are shot over cliff edges (and down slopes in terrain) the pitch-angle that they rest at is off, and they seem to be faced more "downwards" than they should be.

    There's another thing. If you set the projectile speed to something low (like 100) and give it a unit target, the projectile will be destroyed long before it actually is supposed to reach it's target. The slower the missile is going, the more inaccurate the timing will be.

    Okay, this is based on
    hitRange
    I see. This is not a very wise way of doing this, and it can display a lot of bugs in plausible situations. I'll give you a screen-shot below with this showing extremely bad cases where the projectile misses it's target and screws up the result. Also, when your targets are moving there seem to be a lot of problems with the projectiles arcing properly; lots of twitching and stuff.

    [​IMG]

    Okay, in this picture you can see how the projectiles are all tilted at an improper angle. The decay-time also tripped me out because the projectiles were all destroyed long before they should, but after further examination it seems that this is handled by your decay timer.

    [​IMG]

    This is what I was talking about before. The three projectiles that seem to be moving strangely are both cases where they've missed their target because it is moving. The other two projectiles are not good examples, but they were twitching as the target moved, facing slightly up to down then back up again. There was also a case where the projectile was stuck on the ground and slowly moved towards the edge of the map. I don't get how you missed these problems, as they are frequent and can be even more frequent when the user doesn't know exactly how to use your system.