Friday, April 13, 2012

Missile flight pattern tuts?

[:1]So, i've been messing with costum missiles wanting to make ballistic missiles. And i'd like to know if there's some tutorial on what the script values for flight patterns do. I got a rough idea but not nearly all of it.|||Ballistic how? because you can also make them like basic projectiles that look like missiles, I'm pretty sure thats what GPG did for the Corsair.
Mike|||There are no 'flight values' for missiles. Missiles are self-propelled and home in on their target (whether a unit or a ground location). Any special behavior (e.g. tactical missiles, nukes) is handled specifically by each missile's script, usually by limiting turn rate and checking distance. A tutorial on that would be silly, because it's different for each missile, and clearly spelled out in each missile's script.|||I meant the tactical missiles, i based my ballistic missile script off it, i (sort of) got it to fly straight up, then make a slow turn till its half way to the target, and then accelerate madly and dive onto it, problem is that doesnt happen at all distances. The only thing i dont really understand is the distance checking and how it's related to all the other things, and i'm guessing that's critical to solving my problem. The way i want it to fly is go straight up for a while, then turn a bit toward the target, then go straight again till its halfway to the target, almost stop at a very high altitude, turn toward it target slowly, and then dive towards it very fast (kinda like how real ballistic missiles fly)|||Then copy the nuke script's distance/movethread functions, because those have a flight path much closer to what you're looking for.
They basically only allow the missile to turn for a set period if time at a specific turnrate at the top of its initial flight, so it turns roughly 90 degrees and flattens out moving toward the target. Then when it gets almost above the target, the distance check opens up the turnrate again and it turns downward toward the target. You can just insert increases to accel/speed/etc at the point where it turns downward, and you should get the behavior you want.|||Alright, will do that. Thanks.

No comments:

Post a Comment