Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Trivial Psychic on December 02, 2016, 08:08:10 pm
-
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?
-
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.
-
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.
-
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.
-
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)
-
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 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.