Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Roanoke on November 23, 2004, 04:19:34 pm

Title: A bit of Help with Directive Text please!
Post by: Roanoke on November 23, 2004, 04:19:34 pm
Let's say an event/objective is achieved when the player stops n number of ships from departing, either destroyed or disabled.

I can use variables to check this but then directice text doesn't quite work (the [number] doesn't appear) Plus if I check that event to the depart orders then "depart" appears in the directive text at the start.
What I really need is a > percent-ships-destroyed or disabled SEXP.
Anyone think of a work around ?
Title: A bit of Help with Directive Text please!
Post by: karajorma on November 23, 2004, 06:21:22 pm
Sounds like the SEXPing isn't quite correct there. If you're checking that a variable = a certain value then events chained to that event definately shouldn't be coming true unless you've made a mistake somewhere. Probably something wrong in your variable calculations.

I've not tried this particular use of this conditional yet but if you're using the latest version of FRED2_Open why not try out the new conditionals?

Something like this should work

when-argument
-number-of
--n
--Ship1
--Ship2
--Ship3
--....
-or
--is-destroyed-delay
---0
---
--has-departed-delay
---0
---
--is-disabled-delay
---0
---
-do-nothing

That should have almost exactly the effect that you want without using variables and in only one event :D Whether it will add a counter to the directive text I don't know.
Title: A bit of Help with Directive Text please!
Post by: Goober5000 on November 23, 2004, 08:04:37 pm
Hm.  That probably won't work.

Another alternative is to set up several disabled hostile stealth fighters a long distance away (on the order of 10,000 m) and destroy them whenever an event comes true.  Then, just use a standard is-destroyed-delay on the stealth fighters.

Hackish, but it works well. :)
Title: A bit of Help with Directive Text please!
Post by: karajorma on November 24, 2004, 07:11:08 am
It won't put the number on the directive or it just won't work?
Title: A bit of Help with Directive Text please!
Post by: Goober5000 on November 25, 2004, 12:53:49 am
Sorry, I meant it probably won't put the number on the directive.  The when-argument code bypasses a lot of the conventional sexp stuff.