Working House Lighting

Ok, tested it with about 20 players.
Got massive desync. Had to disable it. Still I encourage you to continue youre work

Try reducing the number on this line (near the top) to 600:
Code:
_objHouse = nearestObjects [player, ["House"], 2000];

This creates the list of houses within, currently 2000m, 600m is more than adequate. Feel free to reduce further. I am testing with 200m, with the new version I have added in some 'failures' in the power supply so house lights randomly flicker out and not all houses get lit at the start..

New code line:
Code:
_objHouse = nearestObjects [player, ["House"], 600];
 
Will try that. Thanks for the tip.

Wysyłane z mojego HTC Desire S za pomocą Tapatalk 2
 
Btw, in which line shall i add in scripts.txt
?

It was said earlier, add it to the end of line 22 for 5 createvehicle...

EDIT: Actually, strike that... When I ended line 22 for createvehicle (under scripts.txt), I got kicked for script restriction #40... When I moved this line to the actual createvehicle.txt, I did not get any kicks...

EDIT 2: This seems to be working... Sort of... Used your latest code update and what I got was a single, blinking red light at the top of a smoke stack in Elektro... That was the only light spawned... Any ideas on what may have went wrong?

EDIT 3: If it matters, the only change I made was for the "offset", I set it from 0 to -8 to match the custom offset of my server's time (in UTC)... Not sure if I may have interpreted your explanation about offset wrong and this is the actual culprit or not...
 
It was said earlier, add it to the end of line 22 for 5 createvehicle...

EDIT: Actually, strike that... When I ended line 22 for createvehicle (under scripts.txt), I got kicked for script restriction #40... When I moved this line to the actual createvehicle.txt, I did not get any kicks...

EDIT 2: This seems to be working... Sort of... Used your latest code update and what I got was a single, blinking red light at the top of a smoke stack in Elektro... That was the only light spawned... Any ideas on what may have went wrong?

EDIT 3: If it matters, the only change I made was for the "offset", I set it from 0 to -8 to match the custom offset of my server's time (in UTC)... Not sure if I may have interpreted your explanation about offset wrong and this is the actual culprit or not...

Tested it on my test server, seems to working fine.
 
pinkamenaple, I am just looking into the Time / Offset aspect.

I have this line in my ini.sqf:
Code:
diag_log format["DateTime: %1",daytime];
which I would assume would give me the local time.. Yet I seem to always be getting the same result 12.5007, regardless of the setting in HiveExt.ini, very bizarre..
 
Ok, I have updated the first post again. I have moved the time check from the init.sqf into the script file.

As it happens this is the best place for it as if it gets dark when a player is on the server we want the lights to start coming on..

This will work for time settings of Local and Custom, without any need to change the start stop times. It looks as though 12.5007 is some default time, when using Static as your time the time reports back as 12.5007, so I would adjust start and stop times accordingly.
 
Thank you keegan666 glad you like it :)

I have reverted back to the original folder / file names for the sake of not causing confusion and that there is a wealth of information on this thread, sorry for any confusion :)

I will probably have to stick to this folder structure now..
 
Hi BlackHeart. I have looked at the streetlights thinking of creating a light source within the light box on the top of the poles. The only issue I can see is the glare that is created from these light sources. I have seen a good script for adding light bulbs to street lamps, was going to have a look through this at some point, might be worth a look..

I am currently adding to this script to improve performance and add some effects. I am stuck trying to pass an object to another function though..
How is it? You got to find a way to find or add objects lightswitch or streedlamp ?
 
I would look for the street lamp objects and then add a light source at the correct relative position to the streetlamp object. Though streetlamps are technically banned.

Going to write a script that puts up a hint for every object within 2m of the player to try and get street lamp names back. Then work with them.

Have already tried on the supposed allowed street lamps, but couldn't find them. Admittedly, have not spent a lot of time on this, been getting my house lighting perfected.

Sadly, my hosting has just had another 'network problem', I think desyncs are messing with my testing.. back to my local server for now, booo..
 
forums.bistudio.com/showthread.php?137716-Overwrite-classes (had to remove the http:// since I have to wait 10 days before I can post external links)

Found this little tidbit... The whole banned streetlamps is only an issue if you're playing vanilla DayZ... For rmod, supposedly, the items have been unbanned (but still remain non functioning)... Maybe this can help you in your quest, good sir?

Finally got the script of yours working properly online... No really noticeable lag on a server with close to 20 players...

Thanks again axeman... You are doing the community a true service...
 
About a day with it on my private hive running smoothly with no problems,

Its beautiful and creepy, I Love it.

The longer walks with nothing but darkness is missing something, even if its just one streetlight that just flickers randomly in the distance.

Also I have this idea in my head about rolling blackouts during thunderstorms, just to freak people out with the lighting, have all the lights go out (for a couple moments) followed by the thunder.
 
I have noticed a slight bug, I think when only one house is in range. Will update soon. Love the thunder blackout idea, will see if the current weather can be detected.. not sure if it can be synced to an actual thunder clap but a bit of randomness will help..
 
I have noticed a slight bug, I think when only one house is in range. Will update soon. Love the thunder blackout idea, will see if the current weather can be detected.. not sure if it can be synced to an actual thunder clap but a bit of randomness will help..
Yes, theres like only one house lightning up.
 
Back
Top