Author Topic: Random times  (Read 1644 times)

0 Members and 1 Guest are viewing this topic.


Hey all,

Fairly certain this is simple, but as usual my puttering in Fred is not quite working.  I'm putting together a mission where the sensors are to "scramble" at somewhat random intervals.  Like in a nebula storm, but with longer periods of sensors being clear.  Is there a SEXP strategy I can use to generate a "random" time interval (say 5-15 seconds) at which sensors switch from scrambled to non-scrambled and vice versa?  I'm picturing two chained events with an infinite repeat count, basically just flipping the sensors from one status to the other at a randomized interval.

Thanks,

Seth

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

But how do I make it cycle randomly?  Rand-multiple seems like it should be useful, but what I really want is a random INTERVAL before the sexp repeats itself.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
In that case create multiple events with various repeat times to make sure that the effect occurs randomly...or nearly randomly.

The numbers in bold are repeat delays. If the events do the same thing you should get relatively "random" delays between one effect and another. You may use different values.

30, 60, 90, 120...
18, 36, 54, 72...
48, 96, 144, 192...
25, 50, 75, 100...
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Nice.  Thank you.

  

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Let us know about the result... :)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito