Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Grunt on April 11, 2003, 01:00:00 am

Title: Directive text logic (somewhat OT)
Post by: Grunt on April 11, 2003, 01:00:00 am
I'm asking the "code gurus" if someone could explain to me how this algorithm exactly works in the original FS engine.
Sometimes I have problemes with getting directive text working in FRED. I feel that V wanted to make this part a bit too intelligent and they ended up making it a bit primitive (sorry for that).

If I were them I only wanted to see dir. text before an event (any type) occurs and to forget it when the event is true. It seems to me that it's more sophisticated than that.

I don't expect SEXP examples, but some explanation what this algorithm is exactly waiting from me.

To be more specific, why this SEXP does not work ?

Event name (with Dir. text)
when
- or
----has arrived (something)
----is event true (something)
----< distance (of something from something)
do nothing

The sympthom is that the text only appears when the Event becomes true.

Thanks in advance. :rolleyes:
Title: Directive text logic (somewhat OT)
Post by: Kazan on April 11, 2003, 10:26:02 am
Test Event [DirText: Test Event]
+when
|     +has-arrived-delay
|
+ do-nothing
Title: Directive text logic (somewhat OT)
Post by: karajorma on April 11, 2003, 01:07:59 pm
if you`re using has-arrived-delay with a delay of 0 and it's not working try it with a delay of one. It's a frequent problem when used with Beam-Free-all but it may occur in other places too.
Title: Directive text logic (somewhat OT)
Post by: Grunt on April 11, 2003, 04:44:23 pm
Quote
Originally posted by Kazan
Test Event [DirText: Test Event]
+when
|     +has-arrived-delay
|
+ do-nothing


I know that this works in most cases.
But does it mean that FS only accepts one operator for Dir. Text. to work fine ? And must it be "has arrived/has departed/is destroyed" ?
Certainly not. What disturbes me is that it sometimes works with combined operators like in my example. But sometimes not.
And I fail to see the logic in that.

Not mentioning that it's quite a limitation. How to control cases when the text should be lit until an event is true, except if a third event occurs ?

Etc, etc....:doubt: