Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: LoneKnight on September 09, 2011, 02:51:28 pm

Title: and-in-sequence doesn't work?
Post by: LoneKnight on September 09, 2011, 02:51:28 pm
I've been ignoring this issue for a while, but solving it would make my life a lot easier. It seems that when I use and-in-sequence, it doesn't work. According to the description, when the events or information you put in become true in the order they are listed with the SEXP, the effect should trigger. But this doesn't seem to happen. I have a simple and-in-seqence: event-true and key-pressed, but it doesn't work even after I know that these have happened in the correct order. I even tried the key-press before the event was true to see if the order was backwards but no change. Any idea on why and-in-sequence doesn't seem to work?
Title: Re: and-in-sequence doesn't work?
Post by: LordPomposity on September 09, 2011, 04:22:41 pm
If the key is pressed before the event becomes true, FS2O will stop checking for the key to be pressed again. Try adding key-reset to the event that event-true is checking for. Not sure if this is the problem, but it's worth checking.

Title: Re: and-in-sequence doesn't work?
Post by: mjn.mixael on September 09, 2011, 05:40:03 pm
and-in-sequence definitely works. Please see the attached mission.

[attachment deleted by ninja]
Title: Re: and-in-sequence doesn't work?
Post by: Black Wolf on September 09, 2011, 06:27:47 pm
I know it used to give me all kinds of grief - SCP may have fixed it, or it may have never been broken, and I always used it wrong, but I avoid it as a matter of course these days.
Title: Re: and-in-sequence doesn't work?
Post by: karajorma on September 09, 2011, 07:04:23 pm
and-in-sequence is one of the most misused/misunderstood SEXPs out there. Post the mission and/or the SEXP and we can tell you if it should work.
Title: Re: and-in-sequence doesn't work?
Post by: TopAce on October 03, 2011, 06:23:04 am
Basically, "and-in-sequence" mandates that the conditions turn true only in the given order, else the event will be false(!), not incomplete.

Or is there more to it?
Title: Re: and-in-sequence doesn't work?
Post by: karajorma on October 03, 2011, 09:45:01 pm
Nope. That's all there is to it, but people often make mistakes with and-in-sequence because they use a NOT sexp with it and forget that this will evaluate to true at the start of the mission.
Title: Re: and-in-sequence doesn't work?
Post by: LoneKnight on October 04, 2011, 01:46:33 pm
Basically, "and-in-sequence" mandates that the conditions turn true only in the given order, else the event will be false(!), not incomplete.

Okay, so what I was trying to do was have an event that checks for the Player hitting a button, but only after a certain time has elapsed. I now know that if the Player was to hit the button before the time elapsed, it would render the sequence false.

This is what I had:

and-in-sequence
       -has time elapsed
       -key pressed

How would I change this so that this isn't rendered false if the Player uses key press before the time elapses?
Title: Re: and-in-sequence doesn't work?
Post by: Droid803 on October 04, 2011, 03:01:21 pm
...why don't you just use regular and, and then just use key-reset-multiple right before said time elapses.