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 → i need a light cog
i need a light cog
2001-11-21, 11:43 AM #1
I need a cog that will make a light (thing) flicker on and off (like between two templates) when a player enters a sector. Thanks!

------------------
Today is a good day to die...
I find your lack of pants disturbing...
2001-11-21, 12:49 PM #2
Umm. Ok. [http://www.plauder-smilies.com/spiny.gif]


 


#11/2001 GBK
Symbols
Message Startup
Message Pulse
Sector Switch
Thing Ghost
Thing Player Local
Int I=0 Local
Int T=0 Local
End
Code
Startup:
Player = Getlocalplayerthing();
Setpulse(0.1);
Stop;
Pulse:
If(Getthingsector(Player) == Switch) {
If(I == 10) { I=0;
If(T == 0) {Setthinglight(Ghost, 1); T = 1; }
Else { Setthinglight(Ghost, 0); T = 0; } }
Else { I = I + 1; } }
Stop;
End

Dont know if it works, just typed it into the box. But it should... [http://forums.massassi.net/html/biggrin.gif]


------------------
Success is the inverse relationship between effort, gain, and loss.

[This message has been edited by GBK (edited November 21, 2001).]
And when the moment is right, I'm gonna fly a kite.
2001-11-22, 6:22 PM #3
ok, the cog doesn't work. the light doesn't flicker and nothing happens. maybe if it had a ghost postition that the next template came at. if it helps, all it needs to do is go back and forth between templates, say 5 times, and then stop at the burned out light. Thanks!

------------------
Today is a good day to die...
I find your lack of pants disturbing...
2001-11-25, 2:41 PM #4
Is someone going to help?
[http://forums.massassi.net/html/cool.gif]

------------------
Today is a good day to die...
I find your lack of pants disturbing...
2001-11-25, 4:00 PM #5
Cogs. Gotta love 'em.


Code:
#11/2001 GBK
Symbols
Message Startup
Message Pulse
Sector Switch
Thing Light
Model Goodlight
Model Badlight
Flex Pulserate=0.5
Int I=0   Local
Int T=0   Local
End
Code
Startup: Setpulse(Pulserate); Stop;
Pulse: If(Getthingsector(Getlocalplayerthing()) == Switch) {
If(T == 0 && I != 10) { Setthinglight(Light, 1, 0.1); 
Setthingmodel(Light, Goodlight); T = 1; }
Else If(T == 1 && I != 10){  Setthinglight(Light, 0, 0.1); 
Setthingmodel(Light, Badlight);  T = 0; } 
If(I == 10) { Setpulse(0); Setthinglight(Light, 0, 0.1); 
Setthingmodel(Light, Badlight); T = 0; } 
I = I + 1; }
Stop;
End


Its a little sloppy, mainly because I dont have the time to cleam it up. But it should do.

Oh, yeah, BTW, It works, I tested it.


------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-02, 6:46 AM #6
it worked, but it needs to include a light, like used in JED's light mode. thanks! [http://forums.massassi.net/html/biggrin.gif]

------------------
Today is a good day to die...
I find your lack of pants disturbing...
2001-12-02, 8:01 AM #7
JED's 'Light mode', and the objects it controls, do not transfer into the JKL. One cannot directly affect vertex lighting via cog. (AFAIK)

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-02, 1:01 PM #8
ok, thanks anyway [http://forums.massassi.net/html/frown.gif]

------------------
Today is a good day to die...
I find your lack of pants disturbing...

↑ Up to the top!