Jump to content

Help! Small script problem!


Omeletter

Recommended Posts

So, I want to object to dissapear from 6 to 22 game time, but nothing happens! I use this script,

 

scn SSOSamTableNightScript

 

begin GameMode

 

if ( GameHour > 6 ) && ( GameHour < 22 )

SSOFireCandleRef.disable

SSONoFireCandleRef.enable

endif

endIf

else

SSONoFireCandleRef.disable

SSOFireCandleRef.enable

endif

endIf

endif

 

end

 

 

What's wrong? Nothing happens! I tick initially disabled, and persistent reference, and named candles like they should be, please help!

Link to comment
Share on other sites

Hm, why all those endifs?

Actually, when you use else...or elseif, you would only need 1.

My style is like this, that way you can always see if they are too sufficient or not.

begin GameMode

if ( GameHour > 6 ) && ( GameHour < 22 )
	SSOFireCandleRef.disable
	SSONoFireCandleRef.enable
endif
endIf
else
	SSONoFireCandleRef.disable
	SSOFireCandleRef.enable
endif
endIf
endif
end

begin GameMode

if ( GameHour > 6 ) && ( GameHour < 22 )
	SSOFireCandleRef.disable
	SSONoFireCandleRef.enable
else
	SSONoFireCandleRef.disable
	SSOFireCandleRef.enable
endif

end

 

It is explained here, link

another note, if it isn't working.. try removing the else and replacing it with Gamehour < 6 || Gamehour > 22

begin GameMode

if ( GameHour > 6 ) && ( GameHour < 22 )
	SSOFireCandleRef.disable
	SSONoFireCandleRef.enable
elseif ( Gamehour < 6 ) || ( Gamehour > 22 )
	SSONoFireCandleRef.disable
	SSOFireCandleRef.enable
endif

end

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...