Author Topic: Rotating Submodels on ships when a primary bank fires  (Read 3055 times)

0 Members and 1 Guest are viewing this topic.

Offline CMDBob

  • 22
Rotating Submodels on ships when a primary bank fires
Hi, I've got a fighter that has two objects that should rotate when a certain primary bank is being fired. The objects have the right rotation axis defined in their properties, and I've added (what I think is) the right code to the subobject properties to the subobject on the fighter.


Now, I'm not sure what to do next, do I add a subsystem or something? Any help would be appreciated, as I'm bashing my head on a brick wall here.
« Last Edit: April 03, 2012, 02:07:18 am by CMDBob »

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
Re: Rotating Submodels on ships when a primary bank fires
Where's all the fun if you don't do a little sleuthing?  Download NukeMod and use the examples contained therein.

R

  

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Rotating Submodels on ships when a primary bank fires
If you've got BP2 handy you can also use ships therein (the main gun on the Lao Tze, for instance).

 

Offline --Steve-O--

  • 28
  • I might be the last man on earth to use TS3.2
Re: Rotating Submodels on ships when a primary bank fires
wrote this up some time ago, should contain most of what you will need in terms of bending the animation code to your will.
http://www.hard-light.net/forums/index.php?topic=49741.msg1006837#msg1006837
"And so they dwelled in filth, on worlds made of dirt and feces, and there they lay until they stumbled into the skies." --the Mad Prophet

 

Offline Aesaar

  • 210
Re: Rotating Submodels on ships when a primary bank fires
The Lao Tze doesn't have a rotary cannon anymore.  Look at the Gattler.

 

Offline CMDBob

  • 22
Re: Rotating Submodels on ships when a primary bank fires
I think I've got it. A shame I have to make the rotational bit (as it's not the whole gun, it's just two little bits that are joined on to the ship) the weapon model, but it'll work. Now I just have to find a way to lock primary armament selection while still allowing secondary selection in the briefing.

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Re: Rotating Submodels on ships when a primary bank fires
I don't think it's possible at the moment, although it has been requested.
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Rotating Submodels on ships when a primary bank fires
I think I've got it. A shame I have to make the rotational bit (as it's not the whole gun, it's just two little bits that are joined on to the ship) the weapon model, but it'll work. Now I just have to find a way to lock primary armament selection while still allowing secondary selection in the briefing.

limit the player's weapon selection and use $pbank allowed: ( "123" "1234" )( "12345" )

There is a sub model rotation for external primaries

Quote
$External Model File:
FS2 Open 3.6.10:
Defines the models shown on the gunpoint, used with Bobb's external-visible-weapon code.
Syntax: String.pof, model filename

$Submodel Rotation Speed:
FS2 Open 3.6.10:
Defines the rotation speed of the external weapon model
Syntax: Float

$Submodel Rotation Acceleration:
FS2 Open 3.6.10:
Defines the rotation acceleration of the external weapon model
Syntax: Float

and iirc you can fake moving primary gun points by having several in the circle and using the cycle flag on the weapon
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Rotating Submodels on ships when a primary bank fires
I think I've got it. A shame I have to make the rotational bit (as it's not the whole gun, it's just two little bits that are joined on to the ship) the weapon model, but it'll work. Now I just have to find a way to lock primary armament selection while still allowing secondary selection in the briefing.

you can prevent other types of weapons from being equipped to a certain bank (using $allowed pbanks: and $default pbanks:), but i dont think you can enforce the bank so that there is always a weapon there. might launch without one for example. id really like a feature that treats a weapon as part of the ship, where its always equipped (and possibly for ballistic weapons allow partial weapon loads for primary banks).

i brought up another idea a few days ago in another thread, to do a banktypes system. each bank is assigned a type, each type containing a collection of bank settings. like whether to show weapon models in the loadout screen, allow weapon to be changed, ammo characteristics, energy usage, autoaim features (instead of being a per ship or per weapon thing, would be awesome at the per bank level, like having a gimballed gun mount that can accommodate any weapon). possibly also change the way primary and secondary banking is handled, for example treat a secondary bank like a primary bank and vise versa. you could possibly also configure linking and selecting characteristics for various banks. just an idea, im considering it for my own engine, but i dont see why it wont work in fs.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Rotating Submodels on ships when a primary bank fires
Simple solution - allow only one weapon in the bank and fire a SEXP at mission start to change that bank to the weapon you want, just in case the player for some reason removes it.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Rotating Submodels on ships when a primary bank fires
or you could do that. you could probibly also script it.

but dont shoot down the bank types idea just yet, it could allow for a broad range of cool new features.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Rotating Submodels on ships when a primary bank fires
Oh, I'm not shooting it down, that system sounds awesome.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Rotating Submodels on ships when a primary bank fires
It looks like your gatling gun is a part of a ship.
http://www.hard-light.net/wiki/index.php/Subobject_and_subsystem_properties#.24pbank
This could help.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Rotating Submodels on ships when a primary bank fires
weapon models use the "$gun_rotation" property.

i dont know if i ever used $pbank, this actually reminds me of an old deprecated feature (also why nukemod uses weapon models, they had used the older feature before that point) that worked the same way as this is described. the wiki seems to indicate that this was added back in.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Rotating Submodels on ships when a primary bank fires
He seems to be using a gun model integrated with the ship model. Hence I propose using this.

 

Offline qwadtep

  • 28
Re: Rotating Submodels on ships when a primary bank fires
I think I've got it. A shame I have to make the rotational bit (as it's not the whole gun, it's just two little bits that are joined on to the ship) the weapon model, but it'll work.
Pretty sure that shouldn't be a problem, just make the spinny bits their own subobjects and set the firing point to the end of whatever nonspinny bit when you're converting. One of the PCS2 gurus can probably explain better.