Author Topic: Targeted and Logicals: Not All Work  (Read 1438 times)

0 Members and 1 Guest are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Targeted and Logicals: Not All Work
I was just working on my first loop mission for my enhanced FS1, and I'd like an event and its directive to come true when a number of ships have been targeted by the player, but it seems that not all Logicals work.  I can get it to function if I chose the "or" option, so they player targets ship A or ship B, but if I change it to "and", suddenly the event won't work.  Does anyone know how to fix this?  Do I need to open a bug report for this?
The Trivial Psychic Strikes Again!

 

Offline Axem

  • 211
Re: Targeted and Logicals: Not All Work
I don't think the sexp works as a "was this targeted" it works as a "is this targeted right now". So the OR works because one of the two is targeted, but the AND won't work because you can't target two ships at once.

You'd need to do something like make a bunch of events that check to see if something is targeted and then check the events.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Targeted and Logicals: Not All Work
I tried to make two separate events checking that each ship in the list was targeted, and then the directive event checked to make sure that both events came true.  Unfortunately, while the directive event fired, it didn't display the directive until after it had come true.
The Trivial Psychic Strikes Again!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Targeted and Logicals: Not All Work
You need to use the optional parameter of the event-true-delay SEXP. That one allows you to choose whether the event makes the directive display or simply makes it come true or not. By default it does the former.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Targeted and Logicals: Not All Work
Have you set the 2nd argument of the "targeted"-SEXP? Unless you do, you can't have two instances of it in the same check as they are considered mutually exclusive (similar to what Axem said)
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Targeted and Logicals: Not All Work
You need to use the optional parameter of the event-true-delay SEXP. That one allows you to choose whether the event makes the directive display or simply makes it come true or not. By default it does the former.
WOW.  I never noticed that.  I'll give it a try.  Thanks.
The Trivial Psychic Strikes Again!

  

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Targeted and Logicals: Not All Work
The additional "true" thing has solved that problem, though I had to create a separate event for each item that was to be scanned.  It seems a bit clumsy.

Thanks anyway.
The Trivial Psychic Strikes Again!