Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: JSRNerdo on December 29, 2015, 07:32:09 am

Title: Subsystem component linked destruction?
Post by: JSRNerdo on December 29, 2015, 07:32:09 am
Basically, let's say I have a ship with modelled subsystem X which may or may not spin, and several turrets, maybe an engine, maybe some sensors too on that modelled subsystem. How would I go around having all the turrets and such on it blow up when the modelled subsystem blows up because I don't want ghost turrets attached to a dead subsystem firing basically and engine effects from a blown off part of the ship?
Title: Re: Subsystem component linked destruction?
Post by: The E on December 29, 2015, 07:38:22 am
This can be done with sexps or with lua scripting.
Title: Re: Subsystem component linked destruction?
Post by: karajorma on December 29, 2015, 08:43:14 am
The event you need for this is pretty simple.

when-argument
- any-of
-- List of ships with those subsystems
- is-subsystem-destroyed-delay
-- <argument>
-- Name of subsystem
-- 0
- set-subsytem-strength
-- Do this for all the subsystems you want destroyed
- invalidate argument
-- <argument>

Then just set the trigger count to equal the number of ships in the mission.