Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: karajorma on March 21, 2006, 08:02:21 pm
-
Here's something for those who use the new conditionals to play with. The in-Sequence SEXP.
It works like this
when-argument (repeats, 2 second delay)
-in-sequence
--Beta 1
--Beta 4
--Beta 2
--Beta 3
-is-event-true-delay
--0
--Traitor Sabotages Beta Wing
-self-destruct
-- < argument >
-invalidate-argument
-- < argument >
What this SEXP will do is destroy Beta1, wait 2 seconds, blow Beta 4, wait 2 seconds more then kill Beta 2 etc. The SEXP will always return the first argument on the list until that argument is invalidated. I used it to get cylon raiders to launch from the basestar in graceful waves rather than at random but I'm sure some of you will also be able to find a use for it :)
One good one would be to have messages which warn of a time limit all in one event like this.
when-argument (repeats, 60 second delay)
-in-sequence
- 3 minutes left
- 2 minutes left
- 1 minute left
-- game over man
-is-event-true-delay
--0
--Big trouble
-send message
--#command
--high
-- < argument >
-invalidate-argument
-- < argument >
Don't forget the invalidate argument SEXP though. It's pretty important. :D
-
You probably could have called it sequence-of. :p
-
I thought about that but one day I might actually want to do a sequence-of SEXP (Where you must have a certain number of arguments in sequence which are true) and then I wouldn't have anything to call that :)
-
Good point. :)
EDIT: Waitaminnit - does this evaluate for all arguments regardless of whether <argument> is used in the conditional?
-
I based it on Random-of precisely because I didn't want that to happen. Like the Random-of SEXPs this one will only spit out one < argument > at a time regardless of whether or not you've used < argument > in the conditional.
If I ever did a sequence-of SEXP that would have to evalute everything.