Results 1 to 14 of 14

Thread: Movable guns on ai ships in CFS2

  1. #1

    Question Movable guns on ai ships in CFS2

    Hi Colin/Crash,
    Could you give me some info on how to build in ai movable guns, that use the cfg/DP to react to enemies, ie auto-trainable enemy following/firing guns.

    I'm ok with the building and animation of things (FSDS), it's the last part.

    Now, I've re-read Flerk's 'bible', interesting and useful but not specific.

    I scasm'd the CFS2 default SHA_MAHAN to see how it's done. And you get
    ;0x98 gun5
    ;0x9A gun6
    ;0x9C gun0
    ;0x9E gun8
    ;0xA0 gun9
    ;0xA2 gun7
    ;0xA4 gun4
    ;0xA6 gun10
    ;0xA8 gun2
    ;0xAA gun3
    ;0xAC bullets0
    ;0xAE bullets1
    ;0xB0 barrel5
    ;0xB2 barrel6
    ;0xB4 barrel0
    ;0xB6 barrel8
    ;0xB8 barrel9
    ;0xBA barrel7
    ;0xBC barrel4
    ;0xBE barrel10
    ;0xC0 barrel2
    ;0xC2 barrel3

    Now, from what I can see from the ani offset data, various rotary and angular anis were used e.g Engine 3 Prop position (angle) and percentage left wing fold. So no problem of using those type of ani offsets to build into barrels, turrets etc etc (I'd like to know in the SHA_MAHAN what the tags gun, barrel and bullets mean. Is it gun (gun turret), barrel (gun barrel) and bullets (unknown)...????)

    Is it just a case of making sure the turrets and barrels have rotary and angular movement, and then letting the cfg/DP take over auto control?

    Anyway, being naval gurus could you help me out please?

    Many thanks

    Cheers

    Shessi

  2. #2

    Icon26

    I managed to get the main armament on the Essex class to track, but they tracked the the nearest aircraft which in most cases was the player, ( no fun staring down the barrel of a loaded 5"). Since then I haven't bothered.

    This was done while making it and through FSDS. I think Crashaz had better results though.

    regards Collin

  3. #3
    Hi Colin,
    Thanks for getting back.

    Could you explain what you built (part naming) and how you animated it, to get the tracking? I want to build a vessel-board AA gun, which obviously tracks and fires at enemy ac.

    Cheers

    Shessi

  4. #4
    Hi Shessi,

    as you can see the turret only was animated not the barrels. Developement was made early in the build as you can see from the lack of detail on the ships hull.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	gun2.jpg 
Views:	24 
Size:	65.8 KB 
ID:	65105   Click image for larger version. 

Name:	gun3.jpg 
Views:	28 
Size:	42.3 KB 
ID:	65106  

  5. #5
    Senior Member PSULLYKEYS's Avatar
    Join Date
    Sep 2008
    Location
    Florida
    Age
    65
    Posts
    567
    Interesting Collin, the animator in my version of FSDS2 doesn't seem to allow for your own animation. There are stock ones that seem to be available though.

    I have someting from Usio's site a while back that shows how to do it in GMAX, but it loses something in the translation, and it is GMAX.

  6. #6

    Post anuvver tutorial

    Ok Shessi, managed to find it, but as you can see I'm having trouble viewing as its win bloody 7 and I can't get FSDS out of demo mode so bear with me.

    This first image shows the turret completed, note that there is 2 parts to it, the main one and a little box affair on the bottom of it. The little box is the parent part.

    Click image for larger version. 

Name:	Image4.jpg 
Views:	28 
Size:	91.6 KB 
ID:	65199

    In the 2nd image you see the parts properties activation for the child part. Please note its name and the animations and also the centering of the axis, these are very important.

    Click image for larger version. 

Name:	Image2.jpg 
Views:	28 
Size:	100.5 KB 
ID:	65197

    Next image shows the "New condition" parameters.

    Click image for larger version. 

Name:	Image3.jpg 
Views:	27 
Size:	97.2 KB 
ID:	65198

    This image shows the "Rotate" parameters.

    Click image for larger version. 

Name:	Image7.jpg 
Views:	25 
Size:	100.2 KB 
ID:	65202

    Finally this image shows the properties for the Parent part.

    Click image for larger version. 

Name:	Image9.jpg 
Views:	26 
Size:	97.9 KB 
ID:	65203

    The parent part as you may note is fixed and acts as an axis for the child. The child, because of its respotted axis can now swivel around the parent in animation without going off-centre ("Rotation") and this is activated by the "New condition". These 2 animations have to be done in this order.

    The problem is that the macro doesn't recognise friend or foe and goes for the nearest flying object.

    I can't get into the macro stuff because of it being in demo mode.

    Hi Pat, nice to hear from you again.

    regards Collin

  7. #7
    Senior Member PSULLYKEYS's Avatar
    Join Date
    Sep 2008
    Location
    Florida
    Age
    65
    Posts
    567
    Thanks for the lesson Collin. This is the only safe way to talk.

    SULLY

  8. #8

    Icon22

    Here's another trick for you.....

    both fsds2 and fsds3 have a variable text file, this file relates to the commands for the animations etc in either one, fsds3 having the more advanced one.
    If you make a copy of the text for fsds2 and paste it onto your desktop, now copy the one in fsds3 and paste into the fsds2 one on your desktop, delete the double-ups and now swop the two fsds2 texts around you can use fsds3 stuff in fsds2.
    Quite a bit does work, some don't.

    regards Collin

  9. #9
    Senior Member PSULLYKEYS's Avatar
    Join Date
    Sep 2008
    Location
    Florida
    Age
    65
    Posts
    567
    Wow, over my head Collin, let me digest, I havn't gotten in to 3 yet. I's be furthrer along accept for the JO in Toranto. and his drones.



    Quote Originally Posted by Collin View Post
    Here's another trick for you.....

    both fsds2 and fsds3 have a variable text file, this file relates to the commands for the animations etc in either one, fsds3 having the more advanced one.
    If you make a copy of the text for fsds2 and paste it onto your desktop, now copy the one in fsds3 and paste into the fsds2 one on your desktop, delete the double-ups and now swop the two fsds2 texts around you can use fsds3 stuff in fsds2.
    Quite a bit does work, some don't.

    regards Collin

  10. #10

    Thumbs up

    Hi Collin,
    Apologies for not replying sooner, but I did not get a pop-up email about your posts, so was just passing by and thought I'd take a gander.

    Well I followed your tutorial, many thanks, and some problems that it's too late to deal with now...I'll be back.

    Thanks again

    Shessi

  11. #11
    If one was to build a Flakpanzer, could the same turret rotation for the ships be applied to the Flakpanzer/vehicle models ???????

    Some more nice ship models that could make nice turret projects at Google sketchup:-

    http://sketchup.google.com/3dwarehou...43&prevstart=0
    http://sketchup.google.com/3dwarehou...rm&prevstart=0
    http://sketchup.google.com/3dwarehou...cc&prevstart=0
    http://sketchup.google.com/3dwarehou...cc&prevstart=0
    http://sketchup.google.com/3dwarehou...c&prevstart=24

  12. #12
    Quote Originally Posted by Seagull V View Post
    If one was to build a Flakpanzer, could the same turret rotation for the ships be applied to the Flakpanzer/vehicle models ???????
    If using FSDS2, I can't see why not.

    But remember the axis point for the rotation.

    Regards Collin

  13. #13
    Collin,
    Thanks for the tutorial. I had a go at this following your steps precisely to try and get some of the parts on my ships moving, however all that happens is the parts now do not appear in game (compiled straight from FSDS 2.24 using CFS2 option). They are however in the model if I use mdl2dxf to pull them apart again. So I can only figure they is something up with my 'display when' condition, causing it not to display ever. I'm pretty sure it not an issue with my pc and/or CFS2 as your ships seem to work and animate fine.

    Any ideas?

    I don't suppose you'd be willing to create/share a sample file so I can check what I'm doing wrong- the internet is very spares when it comes to .sdl macro tutorials these days.

  14. #14
    I would like to indulge you Woof, but, my FSDS doesn't like win7, nor do the other games I have (Blitzkrieg etc). So until I can get another idiot box with win xp on it I am stuffed.

    regards Collin

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CFS2 Ships in FS2004
    By T Square in forum FS 2002/2004 General Discussion
    Replies: 9
    Last Post: June 25th, 2012, 23:38
  2. CG CFS2 Ships in FS9
    By delta_lima in forum FS 2002/2004 General Discussion
    Replies: 34
    Last Post: April 1st, 2011, 16:19
  3. CFS2 Reality Guns 2.0 - now available!
    By miamieagle in forum CFS2 General Discussion
    Replies: 1
    Last Post: June 10th, 2009, 08:41
  4. Usio New Ships for CFS2 available!
    By miamieagle in forum CFS2 General Discussion
    Replies: 7
    Last Post: January 19th, 2009, 06:43
  5. Firing guns on ships?
    By NCGent in forum FS 2002/2004 General Discussion
    Replies: 6
    Last Post: December 29th, 2008, 12:44

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
  •  


Avsim - Flightsim - SimFlight - Simviation - iflyonline - CFS IP - Quarter Moon Saloon - Com-Central