Author Topic: "Cockpit" subsystem?  (Read 8927 times)

0 Members and 1 Guest are viewing this topic.

"Cockpit" subsystem?

I'm looking for some input on this idea.  What if a very small "cockpit" subsystem could be designed, the destruction of which destroys or - more realistically - permanently disables a ship, regardless of hull strength?  I like the notion of a round going right through the cockpit glass and killing the pilot, leaving the craft in question dead in space as well.  Of course, this subsystem would be a very small target and hard to hit, akin to headshots in first person shooters.  Has this been done already?  If so, how was it accomplished?

Thank you all,

Killface

 

Offline Solatar

  • 211
I tried to implement this in a few missions with sexps...was much too complicated and tedious.

Perhaps someone with scripting knowledge could give this a look?

It'd be interesting to do, but you might have problems with explosions and collisions, etc destroying the subsystem. Fighters with nav or weapons systems in the cockpit area have this problem, I'd hate to die every time.
« Last Edit: August 19, 2008, 12:11:16 am by Solatar »

 

You feel it would have to go to a scripting level?  I was more wondering if it was possible to just add another subsystem to a fighter, a'la the engines, sensors, etc, only to make the cockpit subsystem incredibly tiny, so that it has to be a direct shot to the glass to work.

 

Offline Solatar

  • 211
Sure, you can add the subsystem to the models with modelview or PCS2 and then add it to the table.

Nothing will happen when it's destroyed though. You can do a "is-subsystem-destroyed" event for every fighter in a mission, as I was saying, but that gets VERY tedious.

 

I see the problem.  So, at present, there is no way besides sexp to make the loss of any ONE subsystem destroy or permanently disable a vessel?

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
It's not tedious if you use every-time-argument (or when-argument with a repeat count):

every-time-argument
-any-of
--<List of Fighters>
-is-subsystem-destroyed-delay
--<argument>
--Cockpit
--0
-sabotage-subsystem
--<argument>
--Engine
--999 <--- [Just to make sure it actually goes to zero]

 

Offline Solatar

  • 211
That looks like it could work well.

  

Thanks guys.  On a somewhat related note, I could really use a tutorial of any kind regarding every-time and looping/repeating arguments in SEXPs.  Do you recommend the wiki as a guide, or has anyone here slapped together something superior over the years?  I can fumble my way through it eventually, but I'm on a humble kick and looking for advice.

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂

Thanks guys.  On a somewhat related note, I could really use a tutorial of any kind regarding every-time and looping/repeating arguments in SEXPs.  Do you recommend the wiki as a guide, or has anyone here slapped together something superior over the years?  I can fumble my way through it eventually, but I'm on a humble kick and looking for advice.
The Wiki isn't very good in that department. The SEXPs still aren't fully cataloged.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
you should actually sabotage ALL the subsystems to 0. There'll be noone left to use the sensors or the comms, or to fire the weapons.

(also, I think you should invalidate-argument?)

This could be an interesting "feature" though :P
(´・ω・`)
=============================================================

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
(also, I think you should invalidate-argument?)
Yeah, I always forget that. :/

 

Offline Solatar

  • 211
Akhetons have just become snipers. :P

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
With scripting:

Code: [Select]
#Conditional Hooks
$Application: Freespace 2
$On Frame: [
     local numShips = #mn.Ships
     for i=0,numShips do
          local ship = mn.Ships[i]
          local cockpit = ship['cockpit']
          if cockpit:isValid() then
               if cockpit.HitpointsLeft < 1 then
                    local numSub = #ship
                    for j=0,numSub do
                         ship[j].HitpointsLeft = 0
                    end
               end
          end
     end
]
#End

Edit: Here's another way, except it'll check whenever the ship could take damage, rather than indiscriminately checking every frame.
Code: [Select]
#Conditional Hooks
$Application: Freespace 2
$Object Type: Ship
$On Game Init: [
function doCustomSubsysDamage(ship)
if not ship:isValid() then
return false
end

local cockpit = ship['cockpit']
if cockpit:isValid() then
if cockpit.HitpointsLeft < 1 then
local numSub = #ship
for i=0,numSub do
ship[i].HitpointsLeft = 0
end
end
end

return true
end
]
$On Asteroid Collision: [
doCustomSubsysDamage(hv.Self)
]
$On Debris Collision: [
doCustomSubsysDamage(hv.Self)
]
$On Ship Collision: [
doCustomSubsysDamage(hv.Self)
]
$On Weapon Collision: [
doCustomSubsysDamage(hv.Self)
]
#End
« Last Edit: August 19, 2008, 01:49:08 am by WMCoolmon »
-C

 
Hmm... gotta try this in my 'mod'.
It gives you a lot of opportunities, especially on taking out a capital ship.
But on the other hand, I don`t thing that any intelligent man would place the bridge in a visible place. Except the Fenris and Leviathan :P
no.one

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
But on the other hand, I don`t thing that any intelligent man would place the bridge in a visible place. Except the Fenris and Leviathan :P
Intensify the forward batteries! I don't want anything getting through!
I said intensify the forward batteries!
TOO LATE!!
KABOOM!
*clapclapclapclap*

 
But on the other hand, I don`t thing that any intelligent man would place the bridge in a visible place. Except the Fenris and Leviathan :P
Intensify the forward batteries! I don't want anything getting through!
I said intensify the forward batteries!
TOO LATE!!
KABOOM!
*clapclapclapclap*
Yeah, sounds strangely familliar. But  a good idea for a secondary goals in BoE (:P) missions.
no.one

 

Offline gevatter Lars

  • Another wingnut
  • 213
    • http://gevatter_lars.tripod.com/
Thats something I liked about the new Battlestar Series where the bridge/CIC was inside the ship. Still I would install some big LCDs connected to some cams on the hull to have a virtual view on what it going on.
"Yes! That is my plan, and I see nothing wrong with it. I figure that if I stick to a stupid strategy long enough it might start to work."
 - comment to "Robotech: The Masters"

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
LCD screens to the job just as well as windows.

 
Thats something I liked about the new Battlestar Series where the bridge/CIC was inside the ship.
The same thing goes for most of FS ships too. Except the two mentioned above.
LCD screens to the job just as well as windows.
Yeah, if the ship is designed for a short range battles.
no.one

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Yeah, if the ship is designed for a short range battles.
Well, if your cameras are powerful enough you can always, say, zoom in or whatever.

Besides, in FreeSpace most battles take place in a 10 kilometer radius of the origin because of subspace. In fact, it stands to reason that the largest and most important battles would be fought around Jump Nodes due to their strategic importance. If you control the Jump Node, you can blockade it with your entire fleet, while the enemy can only send in their ships one or two at a time.

Either way your sensors are powerful enough to detect anything really, so there's no actual need for visual identification in a capital ship. There are also references to long-range sensors, which means a capital ship could probably see an enemy coming at long range if they're going through normal space.