Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Light COG
Light COG
2010-01-26, 9:25 AM #1
Hey I need a COG to control the lighting in my level. I want it to flash off and on to match the 1FPS of my mat anim.
Does LEC have one in MOTS? I thought they did lol.
THE GUNDAM PROJECT
2010-01-26, 4:32 PM #2
This might do what you want. lol.
It will turn off all level lights for one second, then back on for one second, in a loop. lol.
Note that this will not automatically sync with your animated material. lol.

Code:
# 2010-01-26 gbk. lol.

symbols
message startup
message pulse

	# this is how often to toggle the on/off state. lol.
flex pulserate=1

	# this is the actual "off" light level. lol.
flex off_level=0

int i=0 local
end
code

startup:
	setPulse(pulserate); // lol
	stop; // lol

pulse:
	i = 1 - i; // lol
	if(i)	enableIRMode(off_level,off_level); // lol
	else	disableIRMode(); // lol
	stop; // lol
end
And when the moment is right, I'm gonna fly a kite.
2010-01-26, 7:32 PM #3
ill let ya know if it works GBK
THE GUNDAM PROJECT
2010-01-27, 5:13 AM #4
Mat sync version.

Code:
# 2010-01-26,27 gbk. lol.

symbols
message startup
message pulse

	# this is how often to toggle the on/off state. lol.
flex pulserate=1

	# this is the actual "off" light level. lol.
flex off_level=0

	# this is the material to toggle. lol.
material tog_mat

int i=0 local
end
code

startup:
	setPulse(pulserate); // lol
	stop; // lol

pulse:
	i = 1 - i; // lol
	if(i)	enableIRMode(off_level,off_level); // lol
	else	disableIRMode(); // lol
	setMaterialCel(tog_mat, i);  // lmfao
	stop; // lol
end
And when the moment is right, I'm gonna fly a kite.
2010-01-27, 7:17 AM #5
first cog worked wonderfully GBK, ill check the second in a second, lol, and let you know.
THE GUNDAM PROJECT
2010-01-27, 7:29 AM #6
second was a beauty thanks GBK, lets see what happens when your fighting mid powerfailure.
THE GUNDAM PROJECT

↑ Up to the top!