PDA

View Full Version : How do I make a gun turret track ai planes



simonu
October 19th, 2008, 13:22
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?

Good_2_Be
October 19th, 2008, 18:57
Usio has a description, I think:isadizzy: this might help maybe :isadizzy: if not hope it was worth the shot,

http://translate.google.com/translate?u=http://www.geocities.jp/usio_no_ibuki

simonu
October 21st, 2008, 12:13
as far as I can make out the translation of usio's instructions I am doing it almost right. just cant quite get it to compile right. I'll keep plugging at it.

simonu
November 7th, 2008, 04:43
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: