• Guest Please check out the Help Wanted thread in Ickie's NewsHawks.
    The future of the Outhouse depends on you!
    Help Wanted

how do you make a gun turret track AI planes

simonu

SOH Staff
Staff member
I am making a model in Gmax for use in CFS2, I want to make a gun turret that tracks AI planes.
I have seen this working in the cfs2 stock ships and in those made by Usio.
I know how to get Makemdl to make CFS2 models, I have examined the internal workings of the stock ship models by extracting a sca file with MDLC.
I see the gun turret animations are working like other stock animations ie no keyframe is required. So it must be down to part naming, I assume the part names are "gun0" for the z axis rotation and "barrel0" for the x axis rotation, how ever when I export the model and save the assembler I do not see the parts separated and the Transform Call so I must be missing something, Does anyone know what I am doing wrong?
 
At last I nailed it...
Having tried creating keyframes for the gun and barrel animations and finding these are still not working, I went back to the CFS2 stock Mahan and B24 and decompiled the models to a scasm source. No keyframes in the Gun and barrel animations there, so what gives? the part names are correct , the pivot points aligned and positioned. I used mdlcommander to capture the X file and looked at that sure enough I see the part name tags are in place. So whats the answer?
Simple, I ve been using the FS2002 SDK version of Makemdl ( The one that will create CFS2 models directly when the extended parameters are enabled via extra commands inserted in the Target line of a shortcut ) >last night after rapping with Psullykeys on skype I had another go at running the export. This time I captured the X file as before but assembled it using the FS9 version of Makemdl. Bingo. A quick peek at the assembler ( save files option checked ) and I can see the Gun and barrel parts have been recognised and, to use scasm terminoligy the TransformCalls are correct. I have yet to actually test the model in CFS2 ( it now needs converting from FS9 to CFS2 structure) but I am confident that it will work fine.
Isn't it the way of Gmax things, you need to use the FS9 Makemdl to compile functions only used in CFS2, The Makemdl that compiles CFS2 models doesnt work on CFS2 specific stock animations.....Go figure :isadizzy:
 
Very interesting challenge and story simonu ... I am happy that you found a/the solution. Now its time for some real fun. :ernae:
 
Holy cow! Great news Simonu... can we see what the final results were? I got a fleet of ships here that need rotating AA guns.

Maybe I can get em squeezed in before the PHP release!
 
Back
Top