Author Topic: Another new conditional SEXP to play with.  (Read 1548 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Another new conditional SEXP to play with.
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
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Another new conditional SEXP to play with.
You probably could have called it sequence-of. :p

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Another new conditional SEXP to play with.
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 :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Another new conditional SEXP to play with.
Good point. :)

EDIT: Waitaminnit - does this evaluate for all arguments regardless of whether <argument> is used in the conditional?

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Another new conditional SEXP to play with.
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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