Page 1 of 1

Coding a new guided weapon

Posted: Wed Feb 10, 2010 8:02 pm
by MR PINK BALLS
Hallo

Ok so im trying to code a completely new custom weapon,but im having some serious trouble.I cant seem to get this ball rolling here I suck balls at coding nowadays,so hears how far ive gotten

Code: Select all

ObjectTemplate.create PlayerControlObject  SRAW
:lol: ive been looking through the codes of the tomahawk,im going to try to recreate the tomahawk but it be names SRAW instead,and I will give it a new LOD,but I don know what these friggin codes mean so totally lost.

1st and biggest problem ther are tomahawk files 1 is Guided tomahawk,the other is just tomahawk ,then they all have ther subfiles,except the tomahawk folder doesent have a objects.con so i thought maybe the one is the body of the vehicle and one is the engine ect ect.but I cant find any code putting the 2 together.


any halp thx

Re: Coding a new guided weapon

Posted: Wed Feb 10, 2010 11:50 pm
by Apache Thunder
Try looking at the SA3 Guided Missile. It's located in the Vehicles/Land folder. (not the SA-3 folder that's for the launcher) Basically it's just a PCO with a engine that is on full thrust and you fire it like you would a projectile. ;)

Re: Coding a new guided weapon

Posted: Thu Feb 11, 2010 12:51 am
by archer
Potential pitfalls:
a) Don't forget to attach a camera to your missile, or the game will crash while firing.
b) The FireArms object that fires your missile has to use ObjectTemplate.fireOnce (or ObjectTemplate.altFireOnce if you use c_PIAltFire for launch) or the game will crash. Even if there's just one missile in the "clip".

I remember figuring guided weapons on my own back when Secret Weapons was new. And people actually played it. Those were times..

Anyway, if you just want your missile to look differently, you can copy all the scripts from sa3 and then just open geometries.con and point GeometryTemplate.file entries to your new meshes. Just remember to pack your StandardMesh folder :)

Re: Coding a new guided weapon

Posted: Thu Feb 11, 2010 7:07 am
by MR PINK BALLS
archer wrote:Potential pitfalls:
a) Don't forget to attach a camera to your missile, or the game will crash while firing.
b) The FireArms object that fires your missile has to use ObjectTemplate.fireOnce (or ObjectTemplate.altFireOnce if you use c_PIAltFire for launch) or the game will crash. Even if there's just one missile in the "clip".

I remember figuring guided weapons on my own back when Secret Weapons was new. And people actually played it. Those were times..

Anyway, if you just want your missile to look differently, you can copy all the scripts from sa3 and then just open geometries.con and point GeometryTemplate.file entries to your new meshes. Just remember to pack your StandardMesh folder :)

Yea I know all that stuffs,i just haven't coded in forever thx tho,I have spent so much time in the modeling sector ive forgotten what I originally was good at,i made some fun guided smaws a while back on ssm works SS as well,all u do is change the projectile template of the smaw or bradly or whatever,to guided_tomahawk and it will work SS have fun ill let u know m progress