I Feel kind of Embarrassed asking this Question...

Post » Tue Nov 24, 2009 12:40 pm

Is there any way I can make lights only come on at night?
User avatar
how solid
 
Posts: 3434
Joined: Mon Apr 23, 2007 5:27 am

Post » Tue Nov 24, 2009 9:41 am

Probably.

But... it's gonna take a lot of script-working and effort- defantly not for a novice.
User avatar
phillip crookes
 
Posts: 3420
Joined: Wed Jun 27, 2007 1:39 pm

Post » Tue Nov 24, 2009 1:10 pm

You sure can, there are a few mods that do this for many lights in the cities. The script is pretty basic actually.
You just need to Disable the light during the day, and Enable it at night.


Begin If ( GameHour >= 20 )	If (GameHour <= 23 )If ( GetDisabled == 1 )       enable    Endif EndifEndifIf ( GameHour >= 0 )	If (GameHour < 6 )If ( GetDisabled == 1 )       enable    Endif EndifEndif	If (GameHour >= 6 )	If (GameHour < 20 )If ( GetDisabled == 0 )       disable    Endif EndifEndifEnd

User avatar
Misty lt
 
Posts: 3400
Joined: Mon Dec 25, 2006 10:06 am

Post » Tue Nov 24, 2009 1:47 am

Wow. I was about to ask about this same thing. Pluto, thank you for that script.

EDIT: Did the gamehour command come with the Bloodmoon expansion, or can it be used with the base game?
User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Tue Nov 24, 2009 12:31 pm

If ( GetDisabled == 1 )
enable
Endif


Is this actually better / faster than just doing an 'enable' without checking to see if it's disabled?
User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Tue Nov 24, 2009 7:18 am

Is this actually better / faster than just doing an 'enable' without checking to see if it's disabled?

Repeatedly disabling or enabling can cause nasty side effects. It's definately worth checking.
User avatar
Mr. Ray
 
Posts: 3459
Joined: Sun Jul 29, 2007 8:08 am

Post » Tue Nov 24, 2009 6:31 am

Repeatedly disabling or enabling can cause nasty side effects. It's definately worth checking.


Thanks for the info! I'll put this in my Tips file for future reference.
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am


Return to III - Morrowind