Hard Light Productions Forums
Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: Phaserbank on September 17, 2010, 12:06:03 pm
-
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.
-
Easy to do via sexps, no need to use lua scripts. Simply use
( 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.
-
Simply use is-subsystem-destroyed-delay in FRED. Like The_E said, no need for LUA whatsoever.
-
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.
-
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.
-
Sir Yes Sir.
-
Sir Yes Sir.
I swear it's less painful than it sounds. I can get you an example if you like.
-
That would be nice.