Animating Guns on Ships?
Results 1 to 21 of 21

Thread: Animating Guns on Ships?

  1. #1

    Animating Guns on Ships?

    Greetings,

    I've been messing around with the gmax files kindly provided by Stuart and I've gotten the radar on the the early Fletcher to rotate in CFS2. I followed the tutorials I found for that and everything seems okay with that regard. However ...

    I've been scouring the internet and haven't found anything that would help with the animation on the guns, i.e. have them track you like those on USIO's ships. He has the same animation that the default ships have. I have found only two references to this process - specifically on this website. I'm writing down what I understand from those two pages to see if I'm on the right track or if I'm missing something. Here goes:

    1. In 2008 a post was made by simonu which alluded to the animation of the guns. He stated that the "guns0" was the translation of the gun (rotate horizontally about the z-axis), while the "barrel0" was the elevation of the gun (rotate vertically about the x-axis). It didn't matter what number followed "guns" or "barrel" as long as you started at 0 and had one of the accepted values which I believe were 0-9.

    2. As per the same post a reply was given by Good_2_Be that Usio had posted a tutorial on how to do it on his webpage, but that it was in Japanese and that google translate was not that great, but something was better than nothing. I've scoured the internet and it seems we have lost this valuable source of information.

    3. According to various items on this website as well as others it seems there is no SDK per say for CFS2, however, there is more than enough info out there that you can cobble together enough data that you can pretty much do anything with CFS2 as long as you stay within the program's limits. There are ways, however, that you can push those limits (maximum polygons in gmax for example) and various other "tweaks" that allow you to modify things by hand (asm tweaks for example as well as editing mis files by hand for missions, etc). I haven't, however, found anything for tweaking an "x" file or "asm" or "sca" file for guns or barrels.

    4. The 2008 post closed by saying that you had to basically make the model using the FS2K2 gmax pack. You then exported and kept the "x" file but didn't compile the model. After exiting gmax you processed the "x" file with the default version of the FS9 gmax make model executable and created the mdl file from that, while keeping the resulting "x" file in the process. The mdl was then processed through MDLC for conversion to CFS2 standard. According to the author, simonu, he had succeeded in everything except testing in CFS2. My question is this: has anyone been able to corroborate his testing? I've tried to no avail to follow this process and nothing. I'm wondering if this is a problem on my end.

    5. Speaking of my end, I'm using (for better or worse) Windows 7 64-bit edition. I haven't had a chance to try and wake up by old Vista 32-bit laptop since I haven't gotten to my storage to dig it out yet. I'm wondering if this can be caused by the fact I'm "mounting" the MDLC with Allen's DosBox release. Has anyone had issues in general producing anything on a 64-bit system? At least for the older programs? Should I get the thing out of storage just to make that one my MDLC rig?

    6. With regards to the different "tweaking" methods I've been reading about, what is the difference between an "sca" file and an "asm" file I've been seeing? I know they are different since the information in the "_0.asm" file gmax created for me is different than the ".sca" file that MDLC put out when I ran a batch file for the mounting of DosBox and ran a de compile of the Usio model of the Lexington. In the Usio model you clearly see information with regards to the "guns" and "barrels" sections as well as some numbers which I'm guessing have to do with the animations, textures, vertices, etc. Is there a simple way to find the info I would need in the "_0.asm" file or "x" file and then just "hand mash" it into existence?

    I know it seems like a lot, but seeing this is my first real try at gmax and CFS2 in general I was wondering if I was doing "noob" mistakes. With FS9 and FSX several things were "depreciated" from one to the next, but the older stuff would still work with a few tweaks here and there. For example, Usio's ships work great in FSX! I took the HMS Eagle and Lexington and have them as ship AI using the SDK from FSX. I found AIBTC to work equally well if not better despite a different approach at making the traffic.

    I want to thank everyone ahead of time for your help on this. Getting the guns to animate was no big deal at first since I figured it was some Microsoft Magic, but when I saw that it was done in the past I needed to figure out how. Could it be I'm just not understanding the process for some of the older stuff in order to get the animations to work?

    Thanks for the help and hope to hear something from the experts out there!

    Regards,

    Jorge
    Miami, FL

    PS: I found the FS2K2 SDK for the MDL files. It specifically states that there are entries for part names gun# and barrel# as well as other names that are CFS2 specific. Will look into this more as I can, but still would like any input from others. Thanks!
    Last edited by Jorge; September 18th, 2019 at 14:38. Reason: FS2K2 MDL SDK found.

  2. #2
    Redding Army Airfield Allen's Avatar
    Join Date
    Dec 2007
    Location
    O85 Benton Field Airport
    Age
    32
    Posts
    4,917
    I have never seen any of these docs about moving guns.

    I can say anything you can do with MDLC you can do with DOSMdlc 2.0 http://www.sim-outhouse.com/sohforum...9&linkid=25224 by using the DOSBox MDLC Command Line.bat
    "Let Being Helpful Be More Important Than Being Right!" Some SOH Founder.

  3. #3
    Thanks Allen! That's the file I was using for the final conversion to CFS2 format. It's an indispensable tool for those of us that have been pushed over to the 64-bit world! I was just wondering if anyone else was having animation issues with the work around. Either way, I'll try and fire up the old 32-bit laptop tomorrow - if it still works, that is!

    Here's the link to the FS2K2 MDL SDK: https://www.fsdeveloper.com/forum/re...ries/fs2002.7/

    It's not a direct link, just to the website where you can get it. It's halfway down next to the makemdl SDK.

    There isn't much as far as explanations of the functions, just, "Used in Combat Flight Simulator" or "Unsupported". For example, there is one in there called "pilot" that is unsupported. It also mentions the "l_wingfold" and "r_wingfold" which is used in the Corsair. It's curious that they also put some damage variables in there as well.

    I'll look more into it and see what I can come up with. Still crossing my fingers, though!

    Jorge
    Miami, FL

  4. #4
    Redding Army Airfield Allen's Avatar
    Join Date
    Dec 2007
    Location
    O85 Benton Field Airport
    Age
    32
    Posts
    4,917
    Here is text of things I know or think work.

    As for gun# and barrel#. I know next to nothing about SCASM editing but it looks like part of the code to make them work is being exported as I can find the part name and guid params for them is being exported from gMax into the model file but they don't work in game.
    Attached Files Attached Files
    "Let Being Helpful Be More Important Than Being Right!" Some SOH Founder.

  5. #5
    Quote Originally Posted by Allen View Post
    Here is text of things I know or think work.

    As for gun# and barrel#. I know next to nothing about SCASM editing but it looks like part of the code to make them work is being exported as I can find the part name and guid params for them is being exported from gMax into the model file but they don't work in game.
    Thanks, Allen!

    I messed with the thing for a while but same results you have. I tried my hand at SCASM editing, but things didn't work out either. At least the thing compiled again with your bat file for MDLC, but nothing as far as movement. With the SCASM edit I somehow lost the radar that I had done with the key frames. I must have done something wrong there since all I changed was the section with the gun0 entry.

    For now I'm just going to work on key frame animating the radars that Stuart is going to use on his ships. I'll just mess with the gun thing every now and then instead. Once I'm done with the radars I'll try again by "grafting" some of the info from Usio's ships if possible. We'll see.

    If anyone has any info or has been able to mess with this please let me know here so we can further look into this. It would be a shame if we lost something that was possible in the past.

    Regards,

    Jorge
    Miami, FL

  6. #6

    What I Remember

    Hey Guys,

    A little bit I remember from Usio's pages (translated), when the model is in gmax the turret needs a rotation point, the barrel a pivot point, then the "whole" a mount.
    Animate "keyframes" and name this points (separately of course). There was mount_, barrel_ and gun_.

    The icing on the cake was having the correct numbers in the ship's *.dp file. Some trigonometry and geometry was needed from rotation point and pivot point in gmax. The numbers gained from this needed to be in the *.dp [GUNSTATIONS] section.
    How Usio arrived at these numbers from gmax, I have no idea. This part became lost in the translation.

    Not much in the tutorial catagory, so take it for what it is.

    Cheerz,
    Dave

  7. #7
    Awesome! Like I wrote to Allen yesterday, I'm starting to feel like LtCdr Rochefort in the intel section of Pearl Harbor just before Midway! I'm slowly starting to get bits and pieces from experiments and scouring this site for anything that can help, and it seems you just gave me the whole thing in one! I just went from 1 in 10 to about 6 in 10!

    Like I was discussing with Allen yesterday, the DP is something of a mystery. However, I think I've broken part of the code. The negative system numbers are not tied o anything in particular. They're MS's way differentiating between airplane and non-airplane. The main difference is that - with the negative sign - you no longer have a "canned" system you call up. Rather, you now have to "create" the system from scratch. This, as you can imagine, requires a bit more work but it's really not that bad. You also have to remember to label the system whatever the heck you want. The main kicker is the fact you have to remember to add a "one-up" in the final segment of the line for the gunstations. I'm putting together a tutorial from my notes if I can finally get this thing to work. It makes no sense unless you see what I'm talking about.

    I will definitely ask someone to make it a sticky if it does, because if my theory is correct you're going to be able to make ball turrets and waist gunners "swing" and engage as well on aircraft. We'll see.

    Thanks for he input. I owe you one!

    Regards,

    Jorge
    Miami, FL

  8. #8
    Hi Jorge,

    Here's something that may shed more light on the subject.

    Download these files paying close attention to the one named cfgse_DP.

    If there is any problems opening the files you may need to add an exception to any anti-virus or maleware programs on your computer. Don't fret, these files are safe. It's due to the fact that each is an *.exe.


    Once it's open, scroll down to or search X , Y, Z coordinates ...from this point down is the sections Usio had refered to.
    Though this deals with aircraft, the same applies to ships.

    Best of Luck,
    Dave

  9. #9
    Quote Originally Posted by dvslats View Post
    Hey Guys,

    A little bit I remember from Usio's pages (translated), when the model is in gmax the turret needs a rotation point, the barrel a pivot point, then the "whole" a mount.
    Animate "keyframes" and name this points (separately of course). There was mount_, barrel_ and gun_.

    The icing on the cake was having the correct numbers in the ship's *.dp file. Some trigonometry and geometry was needed from rotation point and pivot point in gmax. The numbers gained from this needed to be in the *.dp [GUNSTATIONS] section.
    How Usio arrived at these numbers from gmax, I have no idea. This part became lost in the translation.

    Not much in the tutorial catagory, so take it for what it is.

    Cheerz,
    Dave
    Dave,

    Just wondering if you had anything taken down as far as the notes from Usio. Even a bad google translation is better than nothing. Just wondering what he meant by "whole" in the scene. Maybe from context I could glean something from it.

    I'm asking about the Usio files or notes since the "mount" doesn't seem to be working. The whole turret disappeared. I keyframed. Nothing. I even tried grouping the three together and nothing. Before the "mount" entry was added the guns would just flail around under one particular axis, but I couldn't figure out which one it was. It looks like they need to be aligned to object instead of world? Also, any mention of settings for export from gmax with regards to keeping or not keeping certain settings? I'm just wondering if there is something between "A" and "B" that we're not seeing here. Almost everything I've read on guns and barrels says they are conditional and not key-framed for animation. The conditions were never explained, however, so I have no idea if it's based on a certain axis or not. Based on the DP info I would guess they are rotated somehow to match the x,z,y format of the DP, but I'm not seeing how to do this in gmax. Or if that's even the correct answer?

    I just read glanced over Caleb's notes on DP files and they are definitely in a better format than what I had gotten off the net. I'll read more into Caleb's notes and try something else tomorrow.

    Thanks for the help on this and if you can think of anything else - no matter how small or insignificant it may seem - please let me know. I'm just starting again with CFS2 after about a decade and a half and wasn't aware we'd lost so many people and websites. Anything can help, so something that may seem normal for everyone else is probably either over my head or I haven't heard of the thing yet (or in a very long time, anyway).

    Thanks!

    Jorge
    Miami, FL
    Last edited by Jorge; September 22nd, 2019 at 19:09. Reason: syntax.

  10. #10
    Redding Army Airfield Allen's Avatar
    Join Date
    Dec 2007
    Location
    O85 Benton Field Airport
    Age
    32
    Posts
    4,917
    To move the axis of a part you need to click on the Hierarchy tab than use Affect Pivot Only. now you should be able to move the axis around and rotate it if needed.

    Click image for larger version. 

Name:	rotate.jpg 
Views:	0 
Size:	60.8 KB 
ID:	71568
    "Let Being Helpful Be More Important Than Being Right!" Some SOH Founder.

  11. #11
    Hi Guys,
    Gun# and Barrel# are Variables used by CFS2 to animate the Gun part. I looked at the stock B24 SCASM file vs Allen's B24J SCASM file and it seems that GMAX does not create these Variables.
    I think Gun# is left/right and Barrel# is up/down. But I am not sure. Also I don't know how many Gun part Variables one can have.
    The Gun parts are only animated for the AI. The movement of the Gun parts is governed by the parameters set in the DP file.
    It looks like one would have to hand edit the SCASM file and put the Variables and Gun Animation calls in the model.

    Hope this helps,
    B24Guy

  12. #12
    Jorge,

    Sorry to say, that's all there is. The info posted is from my notes. And for the original...well that was over ten years ago. I had tried it on the Bainbridge destroyer in gmax with no success.

    The phrasing "whole" threw me off also. This word may be somewhat correct or no where near correct. Sorry.

    Dave

  13. #13
    Hi Jorge,
    I was just thinking it is the same with bullet holes. That variable calls a routine that the model file uses to place bullet hole decals onto the model.

    Wolfi figured out to place bullet holes onto his Aircraft Models. He uses FSDS to model it may support more CFS2 Variables. He maybe able to shed some light on the subject.

    Regards,
    B24Guy

  14. #14
    Quote Originally Posted by The B24 Guy View Post
    Hi Jorge,
    I was just thinking it is the same with bullet holes. That variable calls a routine that the model file uses to place bullet hole decals onto the model.

    Wolfi figured out to place bullet holes onto his Aircraft Models. He uses FSDS to model it may support more CFS2 Variables. He maybe able to shed some light on the subject.

    Regards,
    B24Guy
    B24Guy,

    I was wondering about that myself. I was thinking of maybe doing a "mod" with the gmax files we have of some of Stuart277's ships to show damage on the superstructure if possible. Everything I've seen here on the site seems to support the idea that you only have two things in CFS2: aircraft and scenery. As a result, I'm always thinking that ships have to be treated as aircraft. Modified aircraft, but aircraft none the less. Some things may apply to the aircraft that don't to ships or vehicles and vice versa, but not much in difference. Hence the way to identify systems on ships: you put a negative number and do a one-up sequence and you can define ship systems from the ground up. As many or as few as you want. With an aircraft you have certain default axis assignments for wheels, props, etc. There is something similar at play here. The question is which axis goes to what.

    I know it sounds dumb, but what is the default rotational axis for the tires? I'm guessing it's the default "x" axis, right? In gmax it's red. The "z" is blue, while the "y" is green. If the tires are off the "x" axis then maybe - as everyone says - that has to be the axis that rotates the barrel0 part. Except this hasn't been working. So now the question is this: how does the rotation of the part around one particular axis affect its relationship with the other axis?

    With this in mind I went and used the tip Allen showed above and set the pivot point axis to the "world" alignment. I reset the transform and scale, then rotated the pivot point's axis about the "red" so that the "y" axis (the green) was pointing up and the blue one was pointing towards the back, or rear, of the model. I reset the transform and scale again. I did this to both the gun0 and the barrel0 parts. In the dp file, the axis are not x,y,z but rather x,z,y instead. I then exported and checked the "x" file to see if there was a change - even if I wasn't sure what I was looking at. When I open the "x" file exported with the FS2K2 pack set to CFS2 export (among other switches I'll post when I have something more solid) I found the sections that deal with the gun0 and barrel0 parts. The axis information should be the same but it is not. Here is a code I have found (formatted and "cleaned up" as well) for the parts:

    Frame frm-gun0_LOD_100 {
    FrameTransformMatrix {

    1.000000, 0.000000, -0.000000, 0.0,
    0.000000, 0.000000, -1.000000, 0.0,
    -0.000000, 1.000000, 0.000000, 0.0,
    -0.000000, 53.452000, -7.530982, 1.0;;

    } // End FrameTransformMatrix
    // No exportable mesh was found.

    Frame frm-barrel0_LOD_100 {
    FrameTransformMatrix {

    0.000000, -0.000000, 1.000000, 0.0,
    -1.000000, -0.000000, 0.000000, 0.0,
    0.000000, -1.000000, -0.000000, 0.0,
    -0.000002, 0.836017, 4.130001, 1.0;;

    } // End FrameTransformMatrix
    // No exportable mesh was found.

    I should point out that I have gotten the gun0 portion to work with the axis set up as I just described. It will track and shoot laterally (traverse) as it is supposed to. I've noticed that it will automatically switch to the closest hostile aircraft and fire unless the player/user is the closest target. That's why you'll sometimes see default ship AA guns seem to "stutter" from time to time; they're just re-acquiring targets. I'd like to test out the traversing more before I put the whole process down and have others try as well. Besides, my notes look like hell and are all on physical paper!

    My guess is that the first three lines are the x, y, and z as normally thought of. As stated, the top one for the gun0 works as advertised in the sim. From what I understand there has been success here by other folks such as Colin with this regard, so this shouldn't be new. It's the bottom one that is not working - except for those ships by Usio years ago.

    I'm going to swap the x, y, z numbers from the top to the bottom in the "x" file, recompile, and then see what happens. I'll post what I find and thanks for all the encouragement. I'll try and reach out to Wolfi to see if there are listings for FSDS that may be used to at least "tag" these things properly. I'd really like to know what axis does what in the conditional animation. With keyframe stuff you just have the thing do what you want when you want from 0 to 50, 100, or 200 depending on the part. Conditional ones are sim dependent, so it would be interesting to compare those that we do know with these.

    Wish me luck and, as always, thank you for the input!

    Jorge
    Miami, FL

  15. #15
    Hi Jorge,
    I don't know much about GMAX. It is interesting that GMAX uses the TransForm_Mat instruction. Witch is somewhat beyond Me.
    The stock Models use the Transform call instead. Like this.

    ;uName: gun0 uOffset: 0xCC
    TransformCall( :L0B3422 209 -543 136 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xCC ) "The first three numbers are offsets for X,Y,and Z position of the gun."
    Jump( :L0B3428 )
    :L0B3422
    Jump32( :L0BFF0C ) "This is a jump to the barrel TransformCall witch then jumps and draws the gun parts."
    :L0B3428
    Return

    The Tire variables are four bites of data where as many are two bites. The internal code of CFS2 passes data to the Model witch is used to animate things.


    Anyway that is my two bits.

    B24Guy

  16. #16
    Redding Army Airfield Allen's Avatar
    Join Date
    Dec 2007
    Location
    O85 Benton Field Airport
    Age
    32
    Posts
    4,917
    @The B24 Guy
    I never added any Gun# or Barrel# Variables to my models so they won't be there. I thought they never worked.
    "Let Being Helpful Be More Important Than Being Right!" Some SOH Founder.

  17. #17
    Hi Allen,
    It is not really much of a problem. As long as the gunstations are defined in the DP the AI will fire at their targets. Within the limits set.
    The animations do work. I remember during the testing of the VAL that the bullets were flying at me but the rear gun was pointed 180.
    It took me awhile to get the gun dawn correctly so it pointed correctly.
    I disassembled the stock Indiana and it has 16 guns I bet this is the max.

    Regards
    B24Guy

  18. #18

    My Best Shot, Literally

    Okay, here goes...

    A *.sca file from Usio's ship, snipped.

    In scasm UNIT16 is a flag.
    It seems the barrel naming convention (sequence) begins at barrel0 and gun0. (proper naming in Gmax)

    The TransForm_Mat, the upper three numbers are L/R, UP/DOWN, FOR/AFT from model center for the first iteration. The two following TransForm_Mat have the L/R, UP/DOWN, FOR/AFT in relation to the first three sets of numbers. See for further explanation.. http://www.scasm.de/doc/sca_cmd4.htm#trfm

    A designer need not be concerned with this as the model compiler will do the necessary transformation matrix.

    So which is the rotation or pitch.

    Code:
    ;uType     uOffset   uLen      guidParam                               uName
    ;----------------------------------------------------------------------------------------------------
    ;DICT_SECTION
    ;UINT16    98        2         {0EECADB4-1724-41C6-B977-D87A4C9544E8}  crash_check
    ;UINT16    A4        2         {BB157DA4-1ADF-47FE-8DDE-2054962A99B1}  gun0
    ;UINT16    9C        2         {92E2E7E0-A2A9-41A9-8C28-EE3606324B92}  gun1
    ;UINT16    9A        2         {963A8952-A1B5-4041-BC7B-84BDB8704B93}  gun2
    ;UINT16    A6        2         {9F0D28CD-A70E-4513-AE09-9B0DB0B683E6}  gun3
    ;UINT16    A2        2         {D8B13729-E1FC-468A-A068-E6DF4BBF1ACA}  gun4
    ;UINT16    9E        2         {2EA06A93-FA57-4DC7-A017-770B06B1F6F6}  gun5
    ;UINT16    A0        2         {FB6FE80B-4B46-4C05-B28E-CC971C441215}  gun6
    ;UINT16    A8        2         {1F22276D-0E48-439D-864A-8C639EF0EFDC}  gun7
    ;UINT16    BA        2         {6AB0FF52-1AAE-4708-B0CC-3BE3CAE93C13}  gun12
    ;UINT16    B8        2         {BB157DA5-1ADF-47FE-8DDE-2054962A99B1}  barrel0
    ;UINT16    B4        2         {92E2E7E1-A2A9-41A9-8C28-EE3606324B92}  barrel1
    ;UINT16    AC        2         {963A8953-A1B5-4041-BC7B-84BDB8704B93}  barrel2
    ;UINT16    B6        2         {9F0D28CC-A70E-4513-AE09-9B0DB0B683E6}  barrel3
    ;UINT16    B2        2         {D8B13728-E1FC-468A-A068-E6DF4BBF1ACA}  barrel4
    ;UINT16    AE        2         {2EA06A92-FA57-4DC7-A017-770B06B1F6F6}  barrel5
    ;UINT16    B0        2         {FB6FE80A-4B46-4C05-B28E-CC971C441215}  barrel6
    ;UINT16    AA        2         {1F22276C-0E48-439D-864A-8C639EF0EFDC}  barrel7
    ;UINT16    BC        2         {52691558-6D87-48EC-8487-70CF577305CB}  barrel12
    
    
    ----------------------------------------------------gun0--------------------------------------------------------------------
    
                            Transform_Mat( 
                                  1184.3000488281 24944.7285156250 -7762.7001953125
                                  1.0000000000 0.0000000000 0.0000000000
                                  0.0000000000 0.0000000000 -1.0000000000
                                  0.0000000000 1.0000000000 0.0000000000
                                   )
                                  ;uName: gun0  uOffset: 0xA4
                                  TransformCall( :L1FF0A4 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                  Jump( :L1FF0AA )
    --------------------------------------------------------------------------------------------------------------------------------
                            Transform_Mat( 
                                  -1.7838079929 35267.0078125000 -5531.9140625000
                                  0.9708740115 0.0000000000 0.0000000000
                                  0.0000000000 0.0000000000 -0.9708740115
                                  0.0000000000 0.9708740115 0.0000000000
                                   )
                                  ;uName: gun0  uOffset: 0xA4
                                  TransformCall( :L1FF1F4 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                  Jump( :L1FF1FA )
    --------------------------------------------------------------------------------------------------------------------------------
                            Transform_Mat( 
                                  -0.0010240000 20456.1054687500 -10710.8740234375
                                  1.0000000000 0.0000000000 0.0000000000
                                  0.0000000000 0.0000000000 -1.0000000000
                                  0.0000000000 1.0000000000 0.0000000000
                                   )
                                  ;uName: gun0  uOffset: 0xA4
                                  TransformCall( :L1FF2F0 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                  Jump( :L1FF2F6 )
    :L1FF2F0
                                  Jump32( :L205F64 )
    :L1FF2F6
                            TransformEnd
                      TransformEnd
                TransformEnd
                Return
    --------------------------------------------------------------------------------------------------------------------------------
                Transform_Mat( 
                      0.0000000000 0.0000000000 0.0000000000
                      1024.0000000000 0.0000000000 0.0000000000
                      0.0000000000 1024.0000000000 0.0000000000
                      0.0000000000 0.0000000000 1024.0000000000
                       )
                      Transform_Mat( 
                            0.0000000000 0.0000000000 0.0000000000
                            1.0000000000 0.0000000000 0.0000000000
                            0.0000000000 0.0000000000 1.0000000000
                            0.0000000000 -1.0000000000 0.0000000000
                             )
                            Transform_Mat( 
                                  -0.0010240000 20456.1054687500 -10710.8740234375
                                  1.0000000000 0.0000000000 0.0000000000
                                  0.0000000000 0.0000000000 -1.0000000000
                                  0.0000000000 1.0000000000 0.0000000000
                                   )
                                  ;uName: gun0  uOffset: 0xA4
                                  TransformCall( :L1FF8AE 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                  Jump( :L1FF8B4 )
    :L1FF8AE
                                  Jump32( :L20628A )
    :L1FF8B4
                            TransformEnd
                      TransformEnd
                TransformEnd
                Return
    --------------------------------------------------------------------------------------------------------------------------------
    
                                        Transform_Mat( 
                                              -1.7838079929 35267.0078125000 -5531.9140625000
                                              0.9708740115 0.0000000000 0.0000000000
                                              0.0000000000 0.0000000000 -0.9708740115
                                              0.0000000000 0.9708740115 0.0000000000
                                               )
                                              ;uName: gun0  uOffset: 0xA4
                                              TransformCall( :L2E6572 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                              Jump( :L2E6578 )
    :L2E6572
                                              Jump32( :L2E72DA )
    :L2E6578
                                        TransformEnd
                                        Transform_Mat( 
                                              -0.0010240000 20456.1054687500 -10710.8740234375
                                              1.0000000000 0.0000000000 0.0000000000
                                              0.0000000000 0.0000000000 -1.0000000000
                                              0.0000000000 1.0000000000 0.0000000000
                                               )
                                              ;uName: gun0  uOffset: 0xA4
                                              TransformCall( :L2E65C6 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                              Jump( :L2E65CC )
    
    --------------------------------------------------------------------------------------------------------------------------------
    
                                  0.0000000000 0.0000000000 0.0000000000
                                  1024.0000000000 0.0000000000 0.0000000000
                                  0.0000000000 1024.0000000000 0.0000000000
                                  0.0000000000 0.0000000000 1024.0000000000
                                   )
                                  Transform_Mat( 
                                        0.0000000000 0.0000000000 0.0000000000
                                        1.0000000000 0.0000000000 0.0000000000
                                        0.0000000000 0.0000000000 1.0000000000
                                        0.0000000000 -1.0000000000 0.0000000000
                                         )
                                        Transform_Mat( 
                                              -0.0010240000 20456.1054687500 -10710.8740234375
                                              1.0000000000 0.0000000000 0.0000000000
                                              0.0000000000 0.0000000000 -1.0000000000
                                              0.0000000000 1.0000000000 0.0000000000
                                               )
                                              ;uName: gun0  uOffset: 0xA4
                                              TransformCall( :L2E6B5E 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                              Jump( :L2E6B64 )
    :L2E6B5E
                                              Jump32( :L2E9440 )
    :L2E6B64
                                        TransformEnd
                                  TransformEnd
                            TransformEnd
                            Return
    
    --------------------------------------------------------------------------------------------------------------------------------
    
                                                    Transform_Mat( 
                                                          -1.7838079929 35267.0078125000 -5531.9140625000
                                                          0.9708740115 0.0000000000 0.0000000000
                                                          0.0000000000 0.0000000000 -0.9708740115
                                                          0.0000000000 0.9708740115 0.0000000000
                                                           )
                                                          ;uName: gun0  uOffset: 0xA4
                                                          TransformCall( :L36C856 0 0 0 0.0000000000 0x00 0.0000000000 0x00 0.0000000000 0xA4 )
                                                          Jump( :L36C85C )
    :L36C856
                                                          Jump32( :L36DEAE )
    
    --------------------------------------------------barrel0-----------------------------------------------------------------------
    
                Transform_Mat( 
                      2.6337280273 1155.8861083984 23.3738231659
                      1.0299999714 0.0000000000 0.0000000000
                      0.0000000000 1.0299999714 0.0000000000
                      0.0000000000 0.0000000000 1.0299999714
                       )
                      ;uName: barrel0  uOffset: 0xB8
                      TransformCall( :L205764 0 0 0 0.0000000000 0xB8 0.0000000000 0x00 0.0000000000 0x00 )
                      Jump( :L20576A )
    :L205764
                      Jump32( :L20925A )
    :L20576A
                TransformEnd
                Return
    
    --------------------------------------------------------------------------------------------------------------------------------
    
                ;uName: barrel0  uOffset: 0xB8
                TransformCall( :L206282 0 815 0 0.0000000000 0xB8 0.0000000000 0x00 0.0000000000 0x00 )
                Jump( :L206288 )
    
    --------------------------------------------------------------------------------------------------------------------------------
    
                            Transform_Mat( 
                                  2.6337280273 1155.8861083984 23.3738231659
                                  1.0299999714 0.0000000000 0.0000000000
                                  0.0000000000 1.0299999714 0.0000000000
                                  0.0000000000 0.0000000000 1.0299999714
                                   )
                                  ;uName: barrel0  uOffset: 0xB8
                                  TransformCall( :L2E7A3E 0 0 0 0.0000000000 0xB8 0.0000000000 0x00 0.0000000000 0x00 )
                                  Jump( :L2E7A44 )
    :L2E7A3E
                                  Jump32( :L2E9A92 )
    :L2E7A44
                            TransformEnd
                            Return
    --------------------------------------------------------------------------------------------------------------------------------
    
                            ;uName: barrel0  uOffset: 0xB8
                            TransformCall( :L2E7D66 0 815 0 0.0000000000 0xB8 0.0000000000 0x00 0.0000000000 0x00 )
                            Jump( :L2E7D6C )
    :L2E7D66
                            Jump32( :L2EA0C8 )
    :L2E7D6C
                            Return
    --------------------------------------------------------------------------------------------------------------------------------
    
                                        Transform_Mat( 
                                              2.6337280273 1155.8861083984 23.3738231659
                                              1.0299999714 0.0000000000 0.0000000000
                                              0.0000000000 1.0299999714 0.0000000000
                                              0.0000000000 0.0000000000 1.0299999714
                                               )
                                              ;uName: barrel0  uOffset: 0xB8
                                              TransformCall( :L36E612 0 0 0 0.0000000000 0xB8 0.0000000000 0x00 0.0000000000 0x00 )
                                              Jump( :L36E618 )
    :L36E612
                                              Jump32( :L36F8BE )
    :L36E618
                                        TransformEnd
                                        Return
    --------------------------------------------------------------------------------------------------------------------------------
    I've to lay it out to understand it.

  19. #19
    Hi dvslats,

    Your code looks good except all your calls are for Gun0 and barrel0. You should only have to call the variable once.
    As to witch one is pitch and witch is bank I think that barrel is left/right and gun is up/down.
    I would have to SCASM a jump over one of the calls and recompile then test in the sim.
    If I can find the time I will test and try to find out for you.

    Regards,
    B24Guy

  20. #20
    Guys,

    I posted the solution over on the Naval HQ forum for lack of a batter option. I've asked the moderators to move it where they felt it was better suited if not there.

    It seems gmax will do it. I just was doing it wrong!

    I have to clean up one of the screenshots, but there should be something there to start with for those that want to try and reproduce my results. I'll redo and re-upload the screenshot that is somewhat blurry.

    Thanks again for all the input! I really appreaciate it! Now I know that someone who uses something other than gmax or fsds (such as blender) would probably be able to make a model for CFS2 as well. With an sca file you only need to have the correct numbers to make things animate. It seems that we can use the sca files in combination with an "x" file to make the required animations in the sim. I'd appreciate any more input with regards to this since I'm interested in the sca file. Not being a programmer myself this just seems like another challenge! Just not one for a little while. I'm going to see if I can get the Flying Barrels V.2 to work.

    Thanks for everything, guys, and I look forward to more input now that we can create an mdl file that we can strip down to sca, analyze, and then figure out how the thing works!

    Regards,

    Jorge
    Miami, FL

  21. #21
    Hi Jorge,
    Welcome to the world of SCASM it can become addicting.
    If I can help you to understand I will be happy to try.

    Regards,
    B24Guy

Members who have read this thread: 83

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •