Coding a new guided weapon

Ask questions, discuss ideas, get answers
Post Reply
User avatar
MR PINK BALLS
Posts: 267
Joined: Sun Oct 18, 2009 4:01 pm

Coding a new guided weapon

Post 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
Image Image

I <3 Ironmen
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Coding a new guided weapon

Post 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. ;)
ImageImageImage
I have cameras in your head!
User avatar
archer
Posts: 54
Joined: Fri Feb 05, 2010 4:40 pm
Location: Übertów
Contact:

Re: Coding a new guided weapon

Post 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 :)
dzn.battlefield.pl - my Bf1942 modding website
User avatar
MR PINK BALLS
Posts: 267
Joined: Sun Oct 18, 2009 4:01 pm

Re: Coding a new guided weapon

Post 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
Image Image

I <3 Ironmen
Post Reply