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 → a switch that makes a surface flip between cels
a switch that makes a surface flip between cels
2004-09-17, 3:04 PM #1
does anyone know of a cog that when you use a button, it switches a completely different surface's cels back and forth? i need it for a button that i made a light switch. when i turn it on and off, i want the flourescent light surfaces i put on the ceiling to turn on and off too. please help - im pretty sure this cog already exists in the jk gob somewhere.
2004-09-17, 7:12 PM #2
please help....this is the only thing i have left to do in my level....the only thing i cant do is make cogs myself so i need someones help....please
2004-09-18, 7:31 AM #3
for change the mat....

there is a cog in The New Empire 2 ....
SpriteMod (JO 2003) Roger Wilco Skin

Snail racing: (500 posts per line) ---@%
2004-09-18, 9:52 AM #4
This should be what you want. :)
Code:
# Jedi Knight Cog Script
#
# flourescent_lights.COG
#
# When a switch is (de)activated, a sound is played and another surface's cels are 
#  switched on (off).
# 
# [Darth Slaw]
# 
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message     startup
message     activated

sound       sound0=activate04.wav            desc=switch_on_sound
sound       sound1=deactivate04.wav          desc=switch_off_sound

surface     switch
surface     lightsurf

int         active=0                         local

end

# ========================================================================================

code
startup:
	SetWallCel(switch, active);
	SetWallCel(lightsurf, active);

return;
# ........................................................................................
activated:
	active = 1 - active;
	SetWallCel(switch, active);
	SetWallCel(lightsurf, active);
	PlaySoundPos(sound0[active], SurfaceCenter(switch), 1.0, -1, -1, 0x0);

return;
end
May the mass times acceleration be with you.
2004-09-18, 10:13 AM #5
thanks man youre awesome

↑ Up to the top!