Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Shivan Hunter on April 02, 2010, 10:58:32 pm

Title: subsystem-destroyed and directives
Post by: Shivan Hunter on April 02, 2010, 10:58:32 pm
I've got a goal where Alpha 1 needs to destroy a bunch of subsystems (turreNts) on some ship. There are 11 of them, and I'd like to have the countdown thingy that says how many still have to be destroyed in the directive. I've tried three approaches to getting this to work-

First (and probably most obvious), I tied the directive directly to the destruction of the turrets using a crapload of subsystem-destroyed-delay SEXPs. The directive worked correctly, but there was no countdown number.

Second, I used 11 proxy ships- hostile GTF Pegasus fighters with play-dead orders. They had departure cues tied to each of the subsystems, and the directive now used has-departed-delay with a list of the ships. Apparently, that doesn't produce a countdown number either.

Third, I used a list of arguments, and the same proxy ships were renamed so their names were the turret names (The ships were named Turret35, Turret42, etc). I thought I could just use arguments to self-destruct <argument> when is-subsystem-destroyed-delay( Hyperion, <argument>). I then tied the directive to the destruction of the ships. This produced a countdown number... that stayed at 10. Yes, there are 11 turrets, not 10. I dunno. You know.

Anyway, short of clogging up my events list with 11 individual events to self-destruct each of the fighters, is there a good way of doing this?

</noob>

[EDIT]: Disregard. I forgot the repeat count. I'm a noob.
Title: Re: subsystem-destroyed and directives
Post by: Snail on April 02, 2010, 11:00:35 pm
Did you forget to invalidate argument?
Title: Re: subsystem-destroyed and directives
Post by: karajorma on April 02, 2010, 11:22:59 pm
Had a quick conversation with Shivan Hunter on IRC.

1) Sounds like the 3rd attempt simply missed having a repeat count
2) It would be nice if we could specify a variable to be used in Directives. I'll look into this later.
Title: Re: subsystem-destroyed and directives
Post by: Droid803 on April 02, 2010, 11:57:34 pm
How did :v: do it with the Sathanas turrets?

The number stays constant when you do self-destruct because self-destruct doesn't trigger is-destroyed-delay for whatever reason (as far as I recall, at least).
Title: Re: subsystem-destroyed and directives
Post by: Shivan Hunter on April 03, 2010, 12:05:05 am
They didn't.

Yes, it does. You'll notice that it does work once; just not for the rest of the turreNts.
Title: Re: subsystem-destroyed and directives
Post by: General Battuta on April 03, 2010, 12:19:00 am
Your self-destructing proxy ship technique should work fine assuming you remembered to set some repeats.
Title: Re: subsystem-destroyed and directives
Post by: Jeff Vader on April 04, 2010, 01:00:03 pm
Tips with pics available here (http://www.hard-light.net/forums/index.php?topic=68926.0).