Home   Help Search Login Register  

Author Topic: light sensor...  (Read 2922 times)

0 Members and 1 Guest are viewing this topic.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
light sensor...
« on: 13 Aug 2005, 14:04:58 »
m'kay. flashpoint being as complex and real-worldish as it is, the sun sets at different times depending on the time of year.

what i need is some way of detecting when it's dark. the daytime command is not all that useful here, for the reason outlined above. the only way i can think of is to catch a streetlight and find out if it's lit or not...

but what about islands without lights?

EDIT - and checking the streetlight doesn't seem to work. they return "auto" rather than 'on'...
« Last Edit: 13 Aug 2005, 14:20:18 by bedges »

bored_onion

  • Guest
Re:light sensor...
« Reply #1 on: 13 Aug 2005, 14:34:37 »
a number of half-wit ideas :P:

maybe you could have a AI unit like a chopper or jeep on safe mode and check if its lights are on (can that be done?) because the AI tend to put them on when its dark. - you never know, it could work.

beyond that, the game itself must have some way for the street lights to know whether its dark or not which could be buried deep in the config. the ECP guys might know a thing or two about this.

make a script which will do this by comparing daytime to the date and such like. it would be dull but i think it could be done.

other that I can't think of anything....

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:light sensor...
« Reply #2 on: 13 Aug 2005, 15:27:02 »
mhmm, a few of those crrrazy ideas went through my mind also ;)

detecting a vehicle unit's lights is also not possible it seems.

as far as i know there's no 'date' command, otherwise i could possibly script something which approximates the sunset time... bah humbug!

i may well ask someone in the ecp team, that seems a good bet.

cheers anyways  8)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:light sensor...
« Reply #3 on: 13 Aug 2005, 15:27:38 »
Have you done a search?  I recall reading a thread about a script that calculates sunrise and sun set times based on the date.  It was a few months ago now.
« Last Edit: 13 Aug 2005, 16:53:46 by THobson »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:light sensor...
« Reply #4 on: 13 Aug 2005, 15:32:53 »
 :-[ ach min - anyone ever tell you you're brillant?

found what i'm after here. idiot me for not searching properly...
« Last Edit: 10 Mar 2007, 16:19:08 by bedges »

bored_onion

  • Guest
Re:light sensor...
« Reply #5 on: 13 Aug 2005, 15:43:22 »
this would make a nifty function. that way all we'd have to do was call daylight.sqf.

*makes suggestion in function requests*

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:light sensor...
« Reply #6 on: 13 Aug 2005, 15:49:39 »
only problem being it doesn't work.... at least not in SP as it relies on missionstart.
« Last Edit: 13 Aug 2005, 15:53:12 by bedges »

bored_onion

  • Guest
Re:light sensor...
« Reply #7 on: 13 Aug 2005, 17:14:19 »
put it in the init.sqs maybe? or does missionstart give the date??

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:light sensor...
« Reply #8 on: 13 Aug 2005, 23:19:50 »
My thought on this is that you'd have to open up mission editor and go to the Longest day 6-21/22 shortest 12-21/22 as well as March and Sept 21/22 write down the times of sunrise and sunset. Using no cloud cover on the Selections as to see clear Sunsets.(standing by a town and sea watching lights truning On and Off)
 
Do the math and write a script.

A little of trial and error and a little of Caculations here.

Not Fancy or really fast but should get the Job done. :P
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:light sensor...
« Reply #9 on: 14 Aug 2005, 08:57:44 »
that part of it is pretty simple. the difficulty is finding out what date it is... :P

Offline Mikero

  • Former Staff
  • ****
  • ook?
    • Linux Step by Step
Re:light sensor...
« Reply #10 on: 14 Aug 2005, 09:45:43 »
Oh well, not knowing what I'm talking about never stops me 8)

vehicle actions to turn headlights on / off, are removed during 'daylight'. Since you can andd and delete actions, can you test for their presence also?

Just say no to bugz

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:light sensor...
« Reply #11 on: 14 Aug 2005, 13:34:55 »
interesting idea... i wonder. hmmmm.....

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:light sensor...
« Reply #12 on: 15 Aug 2005, 01:47:00 »
I won't give up on the idea of math solving this and  the "angle' of Island with no lights.

Count the days as in Jan. 1 = 1 to Dec. 31 = 365
So Feb 28 = 59
So for a Script to check which day it is, a person using it would have to type it in.
Is there a way to check the INTEL window date in a script or such?? If so then can it be transferred to numbers easily.

Where my idea is going?? I have no Idea ???
Just some thoughts here.

By the way you may Know this, Jan 1 in the game starts on a Tuesday.
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:light sensor...
« Reply #13 on: 17 Aug 2005, 04:42:05 »
OK I'll admitt it. Math won't slove this True Sensor problem  :'(.

If you are looking for a Light sensor that works all the time then Mikero's Idea is probably the right track to go on.

I set up a little test Jan 1 @ 7:30 am.
 Me as a Player Officer and a Jeep with it's reg. loons inside. All of us on the east side fo Malden beach watching the sun come up.

Test 1. Early Morning at default clouds and the like. One could see the sun coming up and the surrounding area seem bright enough. However the jeep turned off it's Lights at 7:47.~20sec.

Next:  Did the same on everything else and except made it as clear as I possible could. The Jeeps lights went off at 7:33 and about ~10 sec.

3rd one was a fog one and it turned off the lights around 7:38.~25sec.

So for a True Light Sensor, Mikero's idea!!

And I'll, just Shut-Up about this  :-X
    Sharkyjoe
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:light sensor...
« Reply #14 on: 17 Aug 2005, 07:23:46 »
excellent :) now all i need to do is find out how to interrogate a jeep's driver to see if he has the lights on or off...  :-\