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 → GBK, your services are needed . .
GBK, your services are needed . .
2004-07-26, 7:46 AM #1
Yes, if indeed you do read this, I would greatly appreciate your help, GBK. This is concerning one of your most intersting areas of expertise, Dynamic Lighting.

Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
So tell me . . . does that light flicker? [http://forums.massassi.net/html/tongue.gif]

</font>


Yes, does it ever, and I now need help selecting the right cog and then implementing it.

Code:
# DLFP, Dynamic Light Flicker Prevention
#
# Version 0.1
#
# 11/2002 GBK
Flags=0x240
Symbols
Message Created
Message Removed
Message Timer

Sector Player_sec	Local
Thing Light		Local
Vector Pos		Local
Vector PYR		Local
Template Type		Local

Flex Time=0.1		Local
End
Code
Created:
Light = Getsenderref();
Pos = Getthingpos(Light);
PYR = Getthinglvec(Light);
Type = Getthingtemplate(Light);
Settimer(Time);
Stop;

Timer:
Destroything(Light);
Stop;

Removed:
Player_sec = Getthingsector(JKgetlocalplayer());
Createthingatpos(Type, Player_sec, Pos, PYR);
Stop;
End


I quote from you:

Quote:
<font face="Verdana, Arial" size="2">
Dont use that, it doesnt work right. I dont know how anyone got ahold of it, but I never could get it to work reliably.

Download OTS (link in sig), there is a fully functional DL controller in the gob. I think the filename is ``lights.cog``...
</font>


So, that's not the right one. But to answer your question, I found it in your level "OTS," and if it serves no purpose it throws a lot of people like me off due to its name, so perhaps you could remove it.

Now, for the "lights.cog":

Code:
# "Ode to Suzanne"
#
# Dynamic lighting controller
#
# 12/2002 GBK
Symbols
Message Newplayer
Message Pulse
Thing Ghost0
Thing Ghost1
Thing Ghost2
Thing Ghost3
Thing Ghost4
Thing Ghost5
Thing Ghost6
Thing Ghost7
Thing Ghost8
Thing Ghost9
Int Used
Template L
Thing LL0=-1		Local
Thing LL1=-1		Local
Thing LL2=-1		Local
Thing LL3=-1		Local
Thing LL4=-1		Local
Thing LL5=-1		Local
Thing LL6=-1		Local
Thing LL7=-1		Local
Thing LL8=-1		Local
Thing LL9=-1		Local
Thing Player		Local
Sector Player_sec	Local
Flex Rate=0.1
Int I=0		Local
End
Code
Newplayer: 
Player = Getsenderref();
Setpulse(Rate); 
Stop;
Pulse:
Player_sec = Getthingsector(Player);
For(I=0;I<=Used;I=I+1) {
If(LL0 != -1) Destroything(LL0); 
LL0 = Createthingatpos(L, Player_sec, Getthingpos(Ghost0), '0 0 0'); 
If(LL0 == -1) Print("Light creation failure"); }
Stop;


If this is indeed the one, perhaps you could tell me the meaning of each variable, and how to set it up, because I've already tried several different configurations and my lights just keep on flickering. Thanks a bunch GBK.

P.S. Btw I just got back from a mission trip to Berea, Kentucky, which I believe is your home state. I was part of the Episcopalian PYE 2004 Mission Trip (Province Youth Event), and we worked on rebuilding a small community in Barnes Mountain.

------------------
~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-26, 12:30 PM #2
I must have been stoned when I wrote those things. [http://forums.massassi.net/html/redface.gif]

[Bleh, UBB sucks. Click here for the cog

Comments are self-explanitory, but Ill explain what I can . . . and of what I can rememeber.


The thing to keep in mind about this cog is; BE VERY CAREFUL ABOUT HOW MANY LIGHTS ARE ACTIVE. If youve got too many, more than 25 if I recall, they will start to shut off. IIRC, I had written a controller that was TVTCS compatable, IE, it enabled/disabled the lights based on passage through ajoins, but I didnt use it in OTS. If bugged enough, I may write it again.

Also, you have to be careful about how many lights you can see at one time. There is a static limit, and I think its somewhere around 8. Dont quote me on that.


When setting up this cog, clear out any other sources of light in the area, and insert a single light. Check to make sure the cog is working, ie the light doesnt flicker, then add another one. So on, and so forth, until youve added all your lights.

Quote:
<font face="Verdana, Arial" size="2">Originally posted by Daft_Vader:
P.S. Btw I just got back from a mission trip to Berea, Kentucky, which I believe is your home state. I was part of the Episcopalian PYE 2004 Mission Trip (Province Youth Event), and we worked on rebuilding a small community in Barnes Mountain.</font>


Nice. [http://forums.massassi.net/html/smile.gif]

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq

[This message has been edited by GBK (edited July 26, 2004).]
And when the moment is right, I'm gonna fly a kite.
2004-07-26, 12:35 PM #3
Thanks GBK, I'll give that a try, and I'll get back to you if it's still not working. [http://forums.massassi.net/html/smile.gif]

8 seems like awfully small number, mind you.

------------------
~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-26, 12:37 PM #4
I've seen some of Friend14s disclosed levels with far more than 25 active dynamic lights, and far more than 8 in view at one point. In-fact, one shot had the entire level in view at once... WAY more than 8 in view.

JediKirby

------------------
jEDIkIRBY - Putting the Romance back into Necromancer.
Proud Leader of the Minnessassian Council

Live on, Adam.
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-07-26, 12:40 PM #5
True, Kirb, but I dont think his lights were stabalized.


Also, according to the rules I should close this thread, because its is aimed at me . . . but Ill leave it open, because it could be of use to others. But next time, if you need my advice, email me.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq
And when the moment is right, I'm gonna fly a kite.
2004-07-26, 4:28 PM #6
Oops, sorry about that. I wasn't aware of that rule, GBK. I promise not to do it again in the future. [http://forums.massassi.net/html/redface.gif]

Anyway, I have some other lighting probs, though I'm not certain if this is cog related, but I'll post it here since I'm unsure and to save starting a new thread.

First of all, Kyle seems to be "emitting" light, even though his field light isn't on. In fact, he emits so much that when you turn your field light on in a formerly dark area, there is no difference - it's very bright. He seems to have about a 10 meter radius, and it's very irritating because it destroy's my nice shadows on the water and also lights up formerly dark tunnels. Any possbile causes and/or fixes?

------------------
~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-26, 4:37 PM #7
Never mind, I fixed it. I had accidentally set the walkplayer's extra light to 1.

------------------
~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-27, 12:32 PM #8
Same as before, they're not working.

Here's a pic of the F7 Cog Window:

[http://pic10.picturetrail.com/VOL347/2098655/4074358/61437654.jpg]

Should I set that value for the number of lights from "9" to "10"? I wasn't sure, since I've heard JK starts counting from 0.

Anyway, the lights are still flickering. I can see formerly dark, solid walls light up, even though the dl's not in view. If you want me to post a pic, I'll be more than happy to. This is quite frustrating. [http://forums.massassi.net/html/confused.gif]

------------------
~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-27, 2:04 PM #9
But GBK, even though it was sort of a personal thread, anyone could have answered the questions. I think it was particularly aimed at you, but I'm glad it was posted, because it's good to know.

JediKirby

------------------
jEDIkIRBY - Putting the Romance back into Necromancer.
Proud Leader of the Minnessassian Council

Live on, Adam.
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-07-27, 2:19 PM #10
Yeah, 9 goes there.


Youve got too many light cog installed... Like I said, try starting with a single cog, and a single light. If that light works, add one more. Then another. And another. And another. So on, so forth...


Also, dont use the version of the cog that I had pasted into my post. Use the one that I linked to.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq
And when the moment is right, I'm gonna fly a kite.
2004-07-27, 2:22 PM #11
Wait, I just realized something....youve got 'light0.0' listed in that cog. That template emits no light. Do you ghosts have any extra light? If so, set it to 0, the ghost should not emit any light.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq
And when the moment is right, I'm gonna fly a kite.
2004-07-27, 5:26 PM #12
I'm not quite following what you're saying. If I set extra light to zero, how will it emit any light?

------------------
~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-27, 6:40 PM #13
The ghosts themselves do not produce the light. The light is emitted from temporary objects that are created /on/ the ghosts. Giving the ghosts light is pointless, and defeats the purpose of the cog.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-07-28, 5:29 AM #14
So does that mean, I can't use light 0.0 ?

------------------
~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-28, 1:03 PM #15
Why do you want to?

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-07-28, 4:40 PM #16
Because without it, JK only has light1.0 and 3.0 - the first is too small, the latter too large. I need something precise depending on the size of the sector or the dimness setting I'm going for in that specific area.

Perhaps you could tell me how to make my own light templates. I could probably figure it out, but you could save me a lot of trouble.

(btw, now that I've taken away the extra light from the ghosts, the cog works perfectly, no more flicker. Thanks!)

------------------
~ Vader's Corner ~

Some people are addicted to drugs, some people are addicted to alcohol, and then some people are addicted to sex; but as for me, I'm currently suffering from some serious JED addiction.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-29, 3:58 AM #17
Making your own lights is easy. In fact, if you crack open OTS's jkl, youll notice that all my DLs are custom.


Use JED's tempalte creator, and create a new template with one of LEC's lights as a parent, lets say Light1.0. Then, as a parametre, set "extralight" to whatever you need it to be, "2" for example. Give it a new name, like "Light2" and save it. Then, use that template for the light cog.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-07-29, 4:56 AM #18
Well, I wasn't sure if it was just that simple, but I guess it is! Thanks GBK; you = 1337 editor! [http://forums.massassi.net/html/biggrin.gif]

------------------
~ Vader's Corner ~

Some people are addicted to drugs, some people are addicted to alcohol, and then some people are addicted to sex; but as for me, I'm currently suffering from some serious JED addiction.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-29, 6:20 AM #19
Aaarrgh! Maybe I spoke to soon - my level is totally spazzing out, lights are flickering like a disco gone wild and my platforms have disappeared, and the sound they make has increased in volume by about 3x despite their absence.

I suppose one of the reasons is the 25 light visible limit, but why the heck did my platform 3dos disappear? I'm nowhere near the thing limit (124), even taking into account the fact that the lights generated aorund the ghosts would increase it to about 200. What's going on here, what are all these random anomalies, and do they have more than one cause? [http://forums.massassi.net/html/confused.gif]

GBK, perhaps you could whip up that TVTCS cog you were talking about. THat sounds great, although I'm not sure if that will be a complete solution.

------------------
~ Vader's Corner ~

Some people are addicted to drugs, some people are addicted to alcohol, and then some people are addicted to sex; but as for me, I'm currently suffering from some serious JED addiction.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-29, 10:25 AM #20
I don't know what's going on. I've deleted all the light cogs and my level is still not working. It's very odd.

------------------
~ Vader's Corner ~

Some people are addicted to drugs, some people are addicted to alcohol, and then some people are addicted to sex; but as for me, I'm currently suffering from some serious JED addiction.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-29, 4:24 PM #21
Run through all your static objects and make sure none of them have any extra light...

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-07-29, 4:42 PM #22
Does that include walkplayers? Because they're the only things with extra light. And how would that effect the weird sound and the platforms disappearing?

------------------
~ Vader's Corner ~

Some people are addicted to drugs, some people are addicted to alcohol, and then some people are addicted to sex; but as for me, I'm currently suffering from some serious JED addiction.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-07-30, 4:03 AM #23
Hrm, thats very odd. Something other than the lights is causing this. These platforms, do they have assocated cogs? If so, post them.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-07-30, 7:13 AM #24
Code:
# Jedi Knight Cog Script
#
# TJC_rotwalk.cog
#
# Generic spinning walk cog. the walkway's first frame should have a yaw of 360 to make it spin in continus circles.
# lagg can cause the walkway to pause breifly at the end of each turn.
#
# JK version
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols
thing        walkway                                                          
sound        whoosh                                                           
int          dummy                              local                         
flex         time                                desc=speed                             
message      startup                                                          
message      arrived                                                          
end                                                                           

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

code
arrived:
	StopSound(dummy, 0);
startup:
	dummy = PlaySoundThing(whoosh, walkway,5,5,10,0x81);
	 RotatePivot(walkway, 0, Time);
	return;

# ........................................................................................
end


It's a rotator cog for the platforms. I think I found it in the Massassi cog section.

------------------
~ Vader's Corner ~

Some people are addicted to drugs, some people are addicted to alcohol, and then some people are addicted to sex; but as for me, I'm currently suffering from some serious JED addiction.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-08-04, 6:50 AM #25
So ... any ideas GBK?

------------------
Some people are addicted to drugs, some people are addicted to alcohol, and then some people are addicted to sex; but as for me, I'm currently suffering from some serious JED addiction.

~ Vader's Corner ~
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-08-04, 12:38 PM #26
Oh, err, hmm. Pull out /all/ your cogs, see if that fixes it.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!