For those who doesn't know:
I read a lot of discussion about the streetlamp where there were many lines of script. Everybody was calling the object streetlamp... Something like in this script :
? lightison (nearestobject [player,"streetlamp"])=="ON":(nearestobject [player,"streetlamp"])switchlight "off"
That doesn't work !!!
You want to know why ??
Because the lampost are different on Everon or Malden or Nogova etc ...
All the streetlamp objects built in the cities of Everon are "streetlampwood". In malden they are "streetlampmetal" for Nogova there's a lot of lampost which must have different object names ...
So the line script above will work on Everon like this :
? lightison (nearestobject [player,"streetlampwood"])=="ON":(nearestobject [player,"streetlampwood"])switchlight "off"
If you request the status of the light, by default it's alway "AUTO", the day, the night, always.
AUTO means ON because if you set the lamp to ON, it won't be lighting during the day. ON means ON at night and OFF by daylight. AUTO means the same thing. OFF means OFF everytime. The game knows when the night fall and then turn a state (somewhere???) which start all the lights even the cars/boats/planes lights (i.e. the light availability). This nighttime event is not tied to an hour of the day. It's depending of the month of the year. 'Cause the game assume different daylight time depending the month. Winter daylights are shortest, you know that and the game too!
If someone know a way to get the moment when the game starts the lights to synchronize actions... Please tell me!
The streetlamps cannot help because always set to AUTO. May be a way to check the 'turn light on' action menu appearing on the vehicles...
Otherwise don't try to turn on the orginal streetlamp of the mission editor by using the command 'switchlight' ... What you'll see is a very strong light fixed at the middle of the mast and sometime it makes OFP to quit. It's crazy when you "switchlight" on a fridge or a chair ...
The only streetlamps working for your missions are those brought by the different EditorUpgrade1.x.x.pbo under "Streetlamp white/blue/yellow" etc... Where the command to turn on/off is 'this inflame true/false' like a fire.
If i'm stupid, tell me as well...