Author Topic: Tentative Idea: when-delay  (Read 1203 times)

0 Members and 1 Guest are viewing this topic.

Offline FelixJim

  • 28
  • User 11092
Tentative Idea: when-delay
I don't know if this sort of thing has been discussed before, which wouldn't surprise me given what I would imagine to be a useful sexp. Essentially this stems from trying to FRED something, and ending up wishing that the logical operators had delay settings like sexps such as is-destroyed-delay have. After some thought however, I realised that a new conditional, called "when-delay" or somesuch, would be far more useful and flexible, with 3+ arguments; the boolean expression, the delay, and then the action to take when condition is true and delay had been waited out.
I don't think there's a simple way to FRED around this (all I've come up with is chained events (only practical in non-repeating events (I think?)) or saving mission time to a variable and then setting up mission time > variable +5 in the next event) which is why I've popped this here rather that in FREDing discussion.

Anyway, just thought I'd throw that out there (regardless of the inevitable feasibility issues).
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Tentative Idea: when-delay
Actually, there are several options to do this using existing sexps. Chain delay settings or the mission-time sexp (in combination with variables), in combination with the "<", ">", and "and" operators can do just what you are asking for.

Also, chained events can be set to repeat just fine, you just have to make sure that all events in a chain are repeatable (via the trigger count and repeat count options).

Oh, and don't forget the ever useful "interval time" field.
« Last Edit: July 26, 2010, 05:23:17 pm by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

  

Offline FelixJim

  • 28
  • User 11092
Re: Tentative Idea: when-delay
I'm currently using the mission-time and variables trick, but something in me baulks a little at having to set up an a whole extra event just because I want my first one to call a couple of seconds later. Maybe that's just me though.
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval