Author Topic: ED nav lights  (Read 633 times)

Rhaedas

  • Jr. Member
  • **
  • Posts: 68
ED nav lights
« on: April 12, 2017, 11:11:30 am »
So, for the entire time I've been playing ED, I've had my lights automatically on when in docking/undocking mode, because I figured the more visible the better, right? And yet recently some commentary on when people use their lights, and complaints about how bright ship lights are and not to use them near other players, I started thinking, since ships don't have any nav lights really, can I do something to simulate it while not being annoying?

Yes. And it's so simple I'm not sure why I didn't do it before.

I have a command called "strobe" that once run, repeats continuously.

Code: [Select]
Press F7 key and hold for 0.05 seconds and release
Press F7 key and hold for 0.05 seconds and release
Pause 3 seconds

F7 is my lights. 3 seconds feels about right for time, plus doesn't get written to the log, so no spam there.

I have my request docking and launch commands call this. I have my jump and my gear down commands kill it. And using the camera, the timing of keypresses seems to be fast enough that it doesn't light up fully, but does give that flash effect that a nav strobe light would. And from inside it actually sounds like a strobe on an aircraft up close does, so you know it's on.

Rhaedas

  • Jr. Member
  • **
  • Posts: 68
Re: ED nav lights
« Reply #1 on: April 28, 2017, 12:58:39 pm »
For what it's worth, I've added to this routine.

Code: [Select]
Set small int (condition) [strobe] value to 1
Press F7 key and hold for 0.05 seconds and release
Pause 0.01 seconds
Press F7 key and hold for 0.05 seconds and release
Set small int (condition) [strobe] value to [Not Set]
Pause 3 seconds

The variable flag allows my other light commands know if the strobe is occuring, and if it's on, they wait about .5 seconds before killing the strobe command and continuing, insuring the lights are actually off. The pause I added because every once in a while lag in the game would miss the second keypress and I'd end up with lights on all the time except for a brief second as it desynced. Haven't run across that again since adding it.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1051
  • RTFM
Re: ED nav lights
« Reply #2 on: April 28, 2017, 02:38:46 pm »
If you want to make sure a command exits cleanly, I recommend breaking the loop rather than killing the entire command:
Code: [Select]
Pause 3 seconds
Set Boolean [strobe] to True
Start Loop While : [strobe] Equals True
Press F7 key and hold for 0.05 seconds and release
Pause 0.01 seconds
Press F7 key and hold for 0.05 seconds and release
Pause 3 seconds
End Loop
Your other commands can set "strobe" to false, and the loop will self-terminate.
The one caveat is that the command waits three seconds before starting initially, so it doesn't allow the first command to keep going to prevent them running simultaneously and interfering with eachother.