Jump to content

Need Help! Multiple Scripted Lights


Guest Messenjah

Recommended Posts

Guest Messenjah

Okay, so my goal, is that I have a small stage with entertainers on it. Different songs will play and I want different lighting effects playing, depending on what song is playing at the time. For example, for a slow song, I need some simple spotlights to light up the area. A faster song, I may want to throw in some simple rotating disco lights and couple of alternating strobes.

 

Right now, I have a single script with a separate mode for each set of lights, that either runs the scripted animations or disables them completely from playing. I have them separated so that I can do different things with the script. For example, I may want to play the disco lights and strobes at the same time.

 

I was wondering if anyone could look this over and see if there is a better way to accomplish this?

 

I plan at the moment to have some sort of master timer that will alternate between strobe ligths and disco lights for some songs, while slow songs will just use spot lights.

SCN ACStageLightsSCRIPT


Short SpotMode
Short StrobeMode
Short DiscoMode
Short SStage
Short DStage
Short SOldStage
Short DOldStage
Short DoOnce

Float STime	;Strobe Mode Timer
Float DTime	;Disco Mode Timer

Begin GameMode

	Set DTime to DTime + GetSecondsPassed
	Set STime to STime + GetSecondsPassed


	;************************Spot Mode******************************

	If (SpotMode == 1) && (DoOnce == 0)
		ACSpotsREF.Enable
		Set DoOnce to 1
	Elseif (SpotMode == 0) && (DoOnce == 1)
		ACSpotsREF.Disable
		Set DoOnce to 0
	Endif

	;****************************************************************



	;**********************Strobe Mode******************************

	If StrobeMode == 1

		If (STime < .2) && (SStage != 1)
			Set SStage to 1
		Elseif (STime >= .3) && (STime < 1) && (SStage !=2)
			Set SStage to 2
		Elseif STime >= .4
			Set STime to 0
			Set SStage to 1
		Endif

	Elseif StrobeMode == 2
		Set SStage to 3
		Set StrobeMode to 0

	Endif

	If SStage == SOldStage
		Return
	Endif

	If SStage == 1
		S01REF.Disable 0
		S02REF.Enable 0
	Elseif SStage == 2
		S01REF.Enable 0
		S02REF.Disable 0
	Elseif SStage == 3
		S01REF.Disable 0
		S02REF.Disable 0
		Set SStage to 0
	Endif

	Set SOldStage to SStage



	;***********************Disco Mode******************************

	If DiscoMode == 1

		If (DTime < .5) && (DStage != 1)
			Set DStage to 1
		Elseif (DTime >= .5) && (DTime < 1) && (DStage != 2)
			Set DStage to 2
		Elseif (DTime >= 1) && (DTime < 1.5) && (DStage != 3)
			Set DStage to 3
		Elseif (DTime >= 1.5) && (DTime < 2) && (DStage != 4)
			Set DStage to 4
		Elseif DTime >= 2
			Set DTime to 0
			Set DStage to 1
		Endif

	ElseIf DiscoMode == 2

		Set DStage to 5
		Set DiscoMode to 0

	Endif

	If DStage == DOldStage
		Return
	Endif


	If DStage == 1

		R01REF.Enable 0
		R04REF.Disable 0

	Elseif DStage == 2

		R02REF.Enable 0
		R01REF.Disable 0

	Elseif DStage == 3

		R03REF.Enable 0
		R02REF.Disable

	Elseif DStage == 4

		R04REF.Enable 0
		R03REF.Disable 0

	Elseif DStage == 5

		R01REF.Disable 0
		R02REF.Disable 0
		R03REF.Disable 0
		R04REF.Disable 0
		Set DStage to 0
	Endif

	Set DOldStage to DStage

End
;****************************************************************
Link to comment
Share on other sites

  • Recently Browsing   0 members

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