Missiles

Here you will find tutorials on modding

Moderators: MrVulcan, thunderchero

Post Reply
User avatar
doci7
Ensign
Ensign
Posts: 201
Joined: Sun Feb 10, 2008 3:00 am

Missiles

Post by doci7 » Wed Feb 27, 2008 11:53 pm

This goes out to all of you advanced programmers out there. Earlier today I discovered for the first time that the torpedo sprites don't turn as they track. Evidently, there is no defined front and back for torpedoes. So this brings me to my question: if you wanted a sprite to behave like a torpedo, but have a defined front and back (sort of a missile behavior), how would you do that? Is there a way you can make pulses turn and track, perhaps? Please let me know what I can do, if anything.

User avatar
S618-18741
Cadet 4th Year
Cadet 4th Year
Posts: 112
Joined: Fri Jan 30, 2004 3:00 am

Post by S618-18741 » Sun Mar 02, 2008 9:37 am

I've been mostly modelling lately so i can't say for certain but you could try adding

// This affects the turning radius/rate somewhat unknown.
omegaTurn = 2.5

//The amount of time that the missile obeys the limitations of omegaTurn
//After that, it heads straight for the target
seekTime = 20


that might work, or it might just crash.

would it be possible to use a SOD based weapon instead? that may be easier.

Good Luck

User avatar
doci7
Ensign
Ensign
Posts: 201
Joined: Sun Feb 10, 2008 3:00 am

Post by doci7 » Fri Mar 07, 2008 1:36 pm

Say, thanks! I thought I had this topic set on "watch", but I was never notified that anyone had responded. I'll certainly give it all a go. Going to have to look into SOD-based weaponry though. (I tried making a blue transwarp wormhole once to no avail, and that was my one and only attempt at a SOD "weapon" thus far...)

User avatar
doci7
Ensign
Ensign
Posts: 201
Joined: Sun Feb 10, 2008 3:00 am

Post by doci7 » Fri Mar 07, 2008 4:30 pm

Thanks again! A little while ago I successfully gave my advanced Federation construction ship a b-wing launcher! This was just to test the SOD weaponry, my ultimate ambition to have working missiles had nothing to do with something quite as random. Nevertheless, it was fun to watch the little derelict b-wings coast on over to the enemy ships (and turn to face them the way they were supposed to)! Now I guess my next step will be to make ancient drones (the real reason I asked). I've been hoping to make the Stargate race of the Ori into a full-blown race, and I figured the best torpedo for them would be ancient drones. And now I can do it! Thanks for a third time!

Fireball
Ensign
Ensign
Posts: 212
Joined: Sat Apr 26, 2003 2:00 am
Location: Canada
Contact:

Post by Fireball » Fri May 23, 2008 7:57 am

I have a question, what did you use for this?
I made missiles in my A2 mod that i'm working on, but they dont turn at the target, they sort of just drift towards it, whether sideways, facing it or whatever.

I have to look up what I used to make this..
I know for a fact that I did use an SOD though.

User avatar
doci7
Ensign
Ensign
Posts: 201
Joined: Sun Feb 10, 2008 3:00 am

Post by doci7 » Fri May 23, 2008 10:44 am

I think you have to use a SOD. I personally just modified the Anti-Matter Mine weapon to make it a standard weapon that referenced the appropriate SOD file. It does look like a nice projectile, but I would be happier if I could think of some way to give it a trail. I noticed, though, that if you use a ship SOD as your weapon geometry, it will essentially fire the derelict version of the ship with the plasma venting and everything, so maybe there's some way of using that quirk to our advantage. One should also, then, be able to add lights the same way you would to a ship, if you're intent on a glowing or partially glowing missile.

Fireball
Ensign
Ensign
Posts: 212
Joined: Sat Apr 26, 2003 2:00 am
Location: Canada
Contact:

Post by Fireball » Fri May 23, 2008 5:11 pm

doci7 wrote:I think you have to use a SOD. I personally just modified the Anti-Matter Mine weapon to make it a standard weapon that referenced the appropriate SOD file. It does look like a nice projectile, but I would be happier if I could think of some way to give it a trail. I noticed, though, that if you use a ship SOD as your weapon geometry, it will essentially fire the derelict version of the ship with the plasma venting and everything, so maybe there's some way of using that quirk to our advantage. One should also, then, be able to add lights the same way you would to a ship, if you're intent on a glowing or partially glowing missile.
Yup you can pretty much do anything with the SOD geometry, you can make a trail, lights, glow, it's all fair game. I've tried and tested this. I have a question, in your first post you were reffering to a missile tracking and pointing at the target, do your missiles do this? Because I already use the "minelayer" class label for it, but it just seems to drift towards the target and not turn?

User avatar
doci7
Ensign
Ensign
Posts: 201
Joined: Sun Feb 10, 2008 3:00 am

Post by doci7 » Sat May 24, 2008 12:48 am

I'm sorry if I misunderstood you. My minelayer weapons do track and point, for whatever reason (one of my missiles is really small so it's almost hard to tell, but in recent times I've added a Dominion Carrier to the game that launches kamikaze Dominion fighters as a weapon. They fly a little awkward but no denying that they always face their target). If you think it'll help by some fluke, I can give you the exact odfs I used. If I had to guess, though, it may be the fact you're modding A2 (my stuff worked on A1, untested on A2). I hope this isn't the issue, but it might be.

Fireball
Ensign
Ensign
Posts: 212
Joined: Sat Apr 26, 2003 2:00 am
Location: Canada
Contact:

Post by Fireball » Sat May 24, 2008 1:15 am

Lol thanks for the offer, I did some testing and these babies do infact track! 8)
I'm pretty happy with these things! I'd say the enemies of the ships they're being fired on arent that happy, but the reality is unless your a Daedalus or something these things wont really harm you :lol:

User avatar
doci7
Ensign
Ensign
Posts: 201
Joined: Sun Feb 10, 2008 3:00 am

Post by doci7 » Sat May 24, 2008 11:09 am

Impressive. Glad to see you got this to work for you! Nice job with the white trail!!! If it isn't too difficult to explain, I'd like to know how you did it, because unless it's a phaser, torpedo, or pulse sprite, I tend to know nothing about it.

Fireball
Ensign
Ensign
Posts: 212
Joined: Sat Apr 26, 2003 2:00 am
Location: Canada
Contact:

Post by Fireball » Sun May 25, 2008 4:24 pm

Do you mean how I created the sprite or how I added the trail to the ship?
I created the sprite by making a trail effect in 3ds max and then rendering it. Once I did that 16 times (yikes...headache :lol: )
I compiled it to a texture and made the sprite entries.

Then to the missile.
I made the geometry and a texture, much like you would for any SOD object. I then added an emitter to where I wanted the smoke to come out.
I believe I named it wxsml (white xtra small)
so simply e_wxsml in 3ds max and pointetd it backwards.

Does this help?

User avatar
doci7
Ensign
Ensign
Posts: 201
Joined: Sun Feb 10, 2008 3:00 am

Post by doci7 » Sat May 31, 2008 11:53 pm

I'll have to try that some time, but emitters kind of intimidate me. Thanks for sharing, though!

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests