Author Topic: reactor->turret lock  (Read 2208 times)

0 Members and 1 Guest are viewing this topic.

Phaserbank

  • Guest
just supose for a minute that there's a diablo and all four of its reactors got shot out. i would like to make a script that locks all of the beam turrrets in this situation, but i'm lost and any help would be appreciated.

Ive been looking through posted scripts and i havent seen anything that involves subsystems.
is there a variable to check like Ship.ReactorSubsystemLeft or something?



ths other things i should mention is that i am noob and when i try to use the deathflash script nothing happens.
 

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Easy to do via sexps, no need to use lua scripts. Simply use
Code: [Select]
( when
    ( and
       ( is-subsystem-destroyed-delay <Ship name> <Reactor 1> 0 )
       ( is-subsystem-destroyed-delay <Ship name> <Reactor 2> 0 )
       ( is-subsystem-destroyed-delay <Ship name> <Reactor 3> 0 )
       ( is-subsystem-destroyed-delay <Ship name> <Reactor 4> 0 )
    )
   (beam-lock-all <ship name>)
)

As for the death flash script, don't use it; Rather copy the configuration data from the 3.6.12 MVPs and edit that for your own mod.
« Last Edit: September 17, 2010, 12:19:11 pm by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Simply use is-subsystem-destroyed-delay in FRED. Like The_E said, no need for LUA whatsoever.

 

Phaserbank

  • Guest
True, for a single ship but, honestly i'd like to add a bunch of subsystems like power relays, bridge, aux_power, life support and so on, and defining the effects as these susbsystems get damaged or destroyed is annoying to do for many ships in fred.   

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
True, for a single ship but, honestly i'd like to add a bunch of subsystems like power relays, bridge, aux_power, life support and so on, and defining the effects as these susbsystems get damaged or destroyed is annoying to do for many ships in fred.   

Well, I'll just say that if I were you I'd definitely do it in FRED. It can be set up in a single event using a bunch of nested conditionals and a high trigger count. You can then copy-paste that event across mission files if you like.

A single event using a when-argument could cover every ship of that class in the mission.

 

Phaserbank

  • Guest
Sir Yes Sir.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Sir Yes Sir.

I swear it's less painful than it sounds. I can get you an example if you like.

 

Phaserbank

  • Guest
That would be nice.