1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Participate in Blizzard's Public Test Realm to give them feedback on the upcoming patches. Info is here.
    Dismiss Notice
  3. Take part in forum poll and decide the winner of Icon Contest #16!
    Dismiss Notice
  4. Congratulate the winners of the first ATC contest!
    Dismiss Notice
  5. Zwiebelchen is hosting a special UI texturing contest. Whomever wins will get a $150 reward through paypal! Come along and draw your texturing tools for the Fantastic Adventurer UI contest.
    Dismiss Notice
  6. Sneak, pickpocket and assassinate! Create a stealth map in Mini-Mapping Contest #14!
    Dismiss Notice
  7. Music Contest #8 - Hive Soundtrack is up! Create the soundtrack for the upcoming videos of Hive Workshop's YouTube Channel.
    Dismiss Notice

[Idea] [system] (vJass) CustomMissle

Discussion in 'Triggers & Scripts' started by Anachron, Feb 3, 2010.

  1. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    Sup m8tes.

    I am currently starting a new system called "CustomMissle".
    This will replace xecollider and have its features plus tons of new features which could be added because I totally recreate that engine.

    My main aspects are:
    • Fast
    • Flexibel
    • High vJass design
    • User friendly

    Optionally detects
    • Units touching
    • Destructable touching
    • Wall touching
    • Missle touching

    Download it here.

    [JASS="EventHandler"]private interface eventHandler
    //: If we have a homing missle, we can just use this to react on the
    //: target reached event.
    method onTargetReach takes nothing returns nothing defaults nothing

    //: Whenever the missle touches an unit it will trigger this event.
    //: Note: You will need to enable unit hitting first!
    //: (set .hitunits = true)
    method onUnitTouch takes unit theUnit returns nothing defaults nothing

    //: Whenever the missle touches a destructable it will trigger this event.
    //: Note: You will need to enable destructable hitting first!
    //: (set .hitdests = true)
    method onDestTouch takes destructable theDestructable returns nothing defaults nothing

    //: Whenever the missle touches a terrain wall it will trigger this event.
    //: Note: You will need to enable terrain hitting first!
    //: (set .hitwalls = true)
    method onWallHit takes nothing returns nothing defaults nothing

    //: Whenever the missle touches a missle wall it will trigger this event.
    //: Note: You will need to enable missle hitting first!
    //: (set .hitmissles = true)
    method onCollide takes CustomMissle theCollider returns nothing defaults nothing

    //: This will be runned the first time the unit moves (and only once).
    //: Note: Paused units do not move.
    method onStart takes nothing returns nothing defaults nothing

    //: This will be runned everytime the missle is in proceeding,
    //: whether its active or not.
    method onLoop takes nothing returns nothing defaults nothing

    //: This will be runned at the end, in the destroy method.
    method onEnd takes nothing returns nothing defaults nothing

    //: This will be runned right after the creation.
    //: Use this to apply your missle settings here.
    method onCreate takes nothing returns nothing defaults nothing

    //: This will return the missle speed.
    //: Use this method to slow / freeze missles.
    method getMissleSpeed takes nothing returns real defaults 0.
    endinterface[/JASS]

    Any other idea what you are missing?
     
    Last edited: Apr 21, 2010
  2. YourNameHere

    YourNameHere

    Joined:
    Apr 29, 2007
    Messages:
    745
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    If you got tons of new features, why not name us some of them?
     
  3. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    Last edited: Apr 6, 2010
  4. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    981
    Resources:
    1
    Spells:
    1
    Resources:
    1
    dont tell me your inventory project is dead because of this.
     
  5. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    Nope, since I am that far from the BetA of the inventory I've started my new project. :D
     
  6. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    981
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Are you far from BetA? I thought you were close to the BetA release of the inventory system. But still this can be useful. Am I able to slow down missiles with this like in the Diablo III map? Not (D3W). Also this will use parabola?
     
  7. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    Yes. XD You can freeze missles, do colliding actions and such.
    And I did a writing mistake. I meant CLOSE to beta. :)
     
  8. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    981
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Good to know. The thing I like with your systems is that you got so many special features in it.
     
  9. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,228
    Resources:
    14
    Spells:
    14
    Resources:
    14
    Should be arc movement both up but also to the sides (Kingz made this just suggesting not stealing idea)

    I wonder if it would be possible to make it go like a wave (parabola up and down) when traveling?
     
  10. Slaydon

    Slaydon

    Joined:
    Jan 6, 2008
    Messages:
    2,437
    Resources:
    0
    Resources:
    0
    hmm, could you draw a drawing in paint of what this will do? X)?
     
  11. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,228
    Resources:
    14
    Spells:
    14
    Resources:
    14
    are you refering to me? else you can look at xecollider (A)
     
  12. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    QFT. Can you please clarify what you mean?
     
  13. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,214
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    I think he means just arcced sideways projectile motion. Like, instead of going straight forward in an arc, it will travel sideways. Kind of like WoW's arcane missiles:
    http://www.wowhead.com/?spell=42846#screenshots:id=136680
    They curve along the sides. At least that is what I interpret it as.

    And the wave thing, he probably is referring to a sine wave motion with a projectile.
     
  14. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    Yeah, the wave thing is already makeable, and the sideway arc is just an great idea.

    Thanks guys! Will implement those nice suggestions.
     
  15. Deuterium

    Deuterium

    Joined:
    Mar 17, 2009
    Messages:
    1,324
    Resources:
    1
    Spells:
    1
    Resources:
    1
    good luck with the system =D
     
  16. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,228
    Resources:
    14
    Spells:
    14
    Resources:
    14
    yes basic you use a parabola but instead of changing height, you change the X and Y position so it will go like a ) or ( to the point, ofc you can add a parabola too for awsomeness :)
     
  17. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    Bump.

    Again I worked on it, this time new from scratch.
    I found it ugly how Vexorian made xecollider, so I have remade a lot of stuff.

    I already have movement and turning working, next is xyArc and zArc.
     
  18. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    981
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Well Anachron. Here I am to help you.
    But first I have a question. Will there be something like:
    Code (vJASS):
    local CustomMissile cm = CustomMissile.CreateWave(real FromX, real FromY, real ToX, real ToY, real speed, real WaveHeight, integer waves)
    Or do you have to wave it manualy?
     
  19. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,147
    Resources:
    64
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Resources:
    64
    Actually its like this atm:
    Code (vJASS):

            local real angle = Atan2(GetUnitX(lol) - 0., GetUnitY(lol) - .0)
            local CustomMissle cm = CustomMissle.create("Abilities\\Weapons\\SearingArrow\\SearingArrowMissile.mdl", 0., 0., 32., angle)
            set cm.scale = GetRandomReal(0.1, 2.)
            set cm.speed = 512.
            set cm.collision = 64.
            set cm.turnspeed = 2.
            call cm.moveToUnit(theUnit, true, true)
            // or
            call cm.moveToPos(x, y)
     
     
  20. Catch_ya

    Catch_ya

    Joined:
    May 21, 2009
    Messages:
    981
    Resources:
    1
    Spells:
    1
    Resources:
    1
    So the static method would be like this?:
    Code (vJASS):
    static method create takes string projectile, real x, real y, real z, real angle returns CustomMissile
     

    I think it is a good idea that you also "split" the method up instead of making turn speed, collision in one method. So you can just add it to the missile after.

    But what if I change the missile's collision to 80 instead of 40 when the event registers a missile hits something?