Disable an object at night (plus an extra feature)

Post » Mon Jun 23, 2014 1:02 pm

Once again, I'm coming to the forum for help on a script. This time I need a script which disables an object at night and the enables it in the morning. HOWEVER, I don't just want the object to blink out in front of the player. I want it to scale down and then disappear (disable). But if the player is far enough away, then the object can just disable/enable. I tried throwing a couple scripts together from the Scripting for Dummies guide, but as usual it's being ineffectual in game.

Any help, please?

Begin AZ_scr_disable_nightfloat directionfloat currscalefloat tempscaleif ( MenuMode )	returnendifif ( GameHour > 19 )	if ( GameHour < 6 )		if ( GetDisabled == 1 )			Return		else			if ( GetDistance > 600 )				disable			elseif ( GetDistance <= 600 )				set direction to -1			endif		endif	endifelseif ( GameHour <= 19 )	if ( GameHour >= 6 )		if ( GetDisabled == 0 )			Return		else			if ( GetDistance > 600 )				enable			elseif ( GetDistance <= 600 )				set direction to 1			endif		endif	endifendifif ( direction != 0 )	set tempscale to .3 * GetSecondsPassed	set tempscale to tempscale * direction	ModScale tempscale	set currscale to GetScale	if ( direction == -1 )		if ( currscale <= .5 )			set direction to 0			disable		endif	else		if ( currscale >= 1 )			set direction to 0			enable		endif	endifendifend

Help! Please! :)

User avatar
Mrs. Patton
 
Posts: 3418
Joined: Fri Jan 26, 2007 8:00 am

Return to III - Morrowind

cron