| 09-16-2004, 06:37 PM | #1 |
One of the spells in my map will work similar to magic missle from baulders gate. When cast balls of energy move out in a circle fashion towards the target. Its kinda hard for me to explain so I will attempt a crude drawing ...----- ../.......\ 0.........X ..\......./ ...------ With 0 being the caster and X being the target, though it would be more round. The dots are there because the fourm messed up my picutre the first time. I have been trying to up a unit as the projectile but I am having trouble making the function to move the unit in the semi circle. I might be making this much more complicated then it is, but any help either with this solution or an easier one is appreciated. |
| 09-16-2004, 10:22 PM | #3 |
ahh.. thats not too bad. you need 5 spells based of lets use storm bolt. they all get a good circular missle projectile (demon form demon hunter missile is good.) they are all the exact same ( but make sure the damage dealt is 1/5 of the total you want dealt) now the important field is missle arc. set the first one to 0. then set one to .05, then .1 then set the 2 others to -.05, and -0.1. i dont have thi most experiance with this field, but im pretty sure small values are what you want. if not, just play around with it. |
| 09-16-2004, 10:54 PM | #4 |
Spells don't have missile arcs, only ranged attacks. Another option, along your line, would be to place dummy units that all attack with different arcs. But then that won't work becuase attacking with arcs is an up and down arc... Hmmmm I don't know! This is quite a spell. You could make some dummy units be the effects and make them move in a semi-circle. This will be some complicated triggering though. Assuming you can spawn the units and turn on this trigger when the spell functions: Now it gets fun. To get the unit to move on the curve, we're going to punch in these equations for the top to the bottom respectively: y=-0.05x^2+5, y=-0.02x^2+2, y=0x^2 y=0.02x^2 - 2, y=0.05x^2 - 5. To convert a distance to our scale you will need to take the (Distance from the MM) to (The Target) / ((Distance between (Caster) and (Target)) / 20) But, that only works if they were in a straight line. What you need is (Math - ABS((X of (Position of (MM))) - (X of (Position of (Target)))) / ((Distance between (Caster) and (target)). Now, that would only work if they were both on the same y coordinate, which will almost never happen. You need to make your own axes exactly between the two of them, with them both on the x axes, and a distance between them of 20. :( That is unless someone else has a better way of doing it... |
| 09-17-2004, 12:13 AM | #5 |
use polar projection. but i have a question.. is it supposed to move along a xy arc, or xz arc? so looking from the top, do the missles stay in a vertical line and follow a missle arc (because spells have missle arcs) or do they branch out horizontaly? for the former i gave you my answer, for the latter.. get the exact middle between the units using.. set middle = polar projection casterloc ((getdistancebetween caster and target)\2) angle between caster and target //create dummy units loop anglebetween caster and target + 180 to angle between caster and target move dummy1 to polar projection middle distance 150 angle forloopindexa move dummy2 to polar projection middle distance 100 angle forloopindexa move dummy3 to polar projection position of caster distance 150 angle angle between caster and target//middle one moves in direct line move dummy4 to polar projection middle distance -100 angle forloopindexa move dummy5 to polar projection middle distance -150 angle forloopindexa wait .1 seconds its something like that. you need someone with more time than me to figure out the angles. |
| 09-17-2004, 12:27 AM | #6 |
To clear things up they branch out horizontaly so I cant use missle arcs. I will see what I can do with the equations both of you gave and post the results later. |
| 09-17-2004, 12:31 AM | #7 |
... Uhm, couldn't you just do what normal people do and use dummy units...? ^_^ |
| 09-17-2004, 12:42 AM | #8 |
Linkmaster: What I am having problems with is getting the dummy units to move in the semi circle to the target, and I also need them to correct if the target moves while the spell is going. |
| 09-17-2004, 12:52 AM | #9 |
Homing missles? |
| 09-17-2004, 01:19 AM | #10 |
hmm.. my equation, actually would auto correct if you put the part where you set middle into the loop part. that is, if what i think about loops is right. if you have a loop 1 through i, if i gets bigger, the loop keeps going, right? |
| 09-17-2004, 08:38 PM | #11 |
-={tWiStÄr}=-: I'm having a bit of trouble understanding your equation im not sure how to put this into the editor move dummy1 to polar projection middle distance 150 angle forloopindexa |
| 09-17-2004, 09:28 PM | #12 |
What is the polar projection? If it's a polar move, where you move towards an angle, how will that be a semi-circle. It would be more like a v instead of a u. Homing missiles won't work because they will go straight for the target he needs them to arc out. I still think my way works well, not easy, but in ensures a good semi-circle. |
| 09-17-2004, 10:09 PM | #13 |
no, polar projection gets a point along the arc of a circle with a distance radius. in the editor it appears something like polar projection from Point with 100 radius 90 degrees so that would draw a circle with a 100 lenght radius, and would pick the point 90 degrees along the arc of the circle. What my function does is every .1 of a second or so, moves each dummy unit (missle) to the next degree or so along the arc. it may not work right for some of the closer in missles because they dont follow a circular arc, its more ovular (i just made up a word :)) |
| 09-17-2004, 10:11 PM | #14 |
Sweet. You learn something new every day. I feel kinda sorry for my parabola equations though, those took a while. |
| 09-18-2004, 03:10 PM | #15 |
I'm confused as to what the guy wants. Magic Missle was just a seeker blue missle... |
