Author Topic: Directive text logic (somewhat OT)  (Read 1216 times)

0 Members and 1 Guest are viewing this topic.

Offline Grunt

  • 28
Directive text logic (somewhat OT)
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:
Just fly on !

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Directive text logic (somewhat OT)
Test Event [DirText: Test Event]
+when
|     +has-arrived-delay
|
+ do-nothing
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Directive text logic (somewhat OT)
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline Grunt

  • 28
Directive text logic (somewhat OT)
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:
Just fly on !