• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Idea] [system] (vJass) CustomMissle

Status
Not open for further replies.
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[/code]

Any other idea what you are missing?
 
Last edited:
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.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
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.

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 :)
 
Level 12
Joined
May 21, 2009
Messages
994
Well Anachron. Here I am to help you.
But first I have a question. Will there be something like:
JASS:
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?
 
Actually its like this atm:
JASS:
        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)
 
Level 12
Joined
May 21, 2009
Messages
994
So the static method would be like this?:
JASS:
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?
 
Level 12
Joined
May 21, 2009
Messages
994
Ok, I am on tomorrow as well. And ofc I will see more cool stuff. Missile systems are ownage. I wish both of us good luck in the making of this. :D But im 100% sure it will be completed. I don't hope we encounter any blizzard bug. -.-
 
Level 12
Joined
May 21, 2009
Messages
994
Have fun with fixing Blizzard's height shit.

Blizzard ruined everything in Warcraft III. Thats why I am waiting for Starcraft II, self even I hate space themes.

Oh well, I already got 3! :D
Nevermind, we will make it. Currently you are able to send an homing missle or a normal wave. (I haven't made arc yet, but thats one of the next points)

One step at a time ofc. :D I am excited for tomorrow.
 
Level 12
Joined
May 21, 2009
Messages
994
Hmm ok... is there a possible to add the pierce ability to units with this system?
(pierce=gives a chance that the missle do not stop flying after it hitted a enemy)
Like diablo II?
That could be possible I think. However right now me and Anachron will work on arc.
But Anachron might have something to say aswell.

edit: and what you think about using the phornix fire ability for collision?
I don't understand how would you do that?
 
Will this missile system be able to make the missiles collide in mid air?

It would be awesome if it could so you could deflect certain spells or attacks.

Hope it turns out well, good luck.
That was one of the main resons. I will for sure allow the user to stop / slow down missles. (And even make a time freeze AOE effect)

Hmm ok... is there a possible to add the pierce ability to units with this system?
(pierce=gives a chance that the missle do not stop flying after it hitted a enemy
Ofcourse :D

and what you think about using the phornix fire ability for collision?
Bad, has delay does not work for invulnerable units, is awfully hardcoded wc3 spell, gives buff, etc.
 
Level 9
Joined
Aug 21, 2008
Messages
533
with an damage detection system. when a unit is damaged by an missle, I destroy the missle and damage the unit by the saved value-1.
The phoenix fire itself shoots invisble missles on nearby enemey(in fact with the range the colliosion should be).

eduit: normaly you should be able to chnge allwoed targets in a way to allow invulnerable units. Yea the buff is awful...., but it gives a free "next hit delay" =O
 
By the way Anachron. Will we use a stub method like OnHit/OnLoop or we use events?
I will most likely do it with stub methods.

with an damage detection system. when a unit is damaged by an missle, I destroy the missle and damage the unit by the saved value-1.
The phoenix fire itself shoots invisble missles on nearby enemey(in fact with the range the colliosion should be).
That's ineffective, and has delay and still doesn't work for friendly units / invulnerable units.
 
how come you need 20 days for 3 lines of code? ( arc )
Ever mad xyarc?

Btw, what makes you think it took me 20 days?
I have worked on this system the second time! And thats 3 hours, at maximum. (From scratch, ofcourse)

btw what makes this different from SEE or MaDos?
Its extendable (Unlike SEE or MaDos)
It allows user defined events.
It allows to attach stuff to it.
Basically, its easy, has a big arsenal of functions and is fast.

You can't do a single homing missle with other missle systems, that have that functionality.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I have a custom projectiles system I've been working on that uses Vectors to calculate a trajectory. It uses that dummy.mdx with pitch animations to achieve a "tilted" projectile. I also use Vectors for "position" and "target-position"; this allows the user to "move" the target during flight (which is handled with a "homing" mechanism). It uses stub methods so that when you extend s_projectile you can customize it by re-defining the methods onRefresh, onFinish, onBirth. I was thinking of adding missile collision though I'm not sure on how that would affect its performance.

Anyways, if you want to see the code then just send me a message.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
YourNameHere said:
^ If you use the appropriate way of checking collisions with vectors, the performance will most likely stay fine.

Even if you use vectors, you still have to loop through all your instances of projectiles to determine whether or not there are any nearby.

Also, why would this require "xe"? The code involved in a projectile system isn't very complex, nor is it something that "xe" is absolutely necessary for... sounds more like lazy-ness to me.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
Also, why would this require "xe"? The code involved in a projectile system isn't very complex, nor is it something that "xe" is absolutely necessary for... sounds more like lazy-ness to me.
It's not really laziness; I would call it being smart. Some of the libraries provided by xe are useful, such as xefx, which I'm guessing will be used by this system.
 
Status
Not open for further replies.
Top