PDA

View Full Version : GBK, your services are needed . .



Daft_Vader
07-26-2004, 10:46 AM
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.


<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.



# 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:


<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":



# "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&lt;=Used;I=I+1) {
If(LL0[I] != -1) Destroything(LL0[I]);
LL0[I] = Createthingatpos(L, Player_sec, Getthingpos(Ghost0[I]), '0 0 0');
If(LL0[I] == -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 (http://www.vader.co.nr/) ~

gbk
07-26-2004, 03:30 PM
I must have been stoned when I wrote those things. http://forums.massassi.net/html/redface.gif

BE VERY CAREFUL ABOUT HOW MANY LIGHTS ARE ACTIVE[/i]. 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.


<font face="Verdana, Arial" size="2">Originally posted by Daft_Vader:
[b]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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)

[This message has been edited by GBK (edited July 26, 2004).]

Daft_Vader
07-26-2004, 03:35 PM
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 (http://www.vader.co.nr/) ~

JediKirby
07-26-2004, 03:37 PM
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.

gbk
07-26-2004, 03:40 PM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)

Daft_Vader
07-26-2004, 07:28 PM
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 (http://www.vader.co.nr/) ~

Daft_Vader
07-26-2004, 07:37 PM
Never mind, I fixed it. I had accidentally set the walkplayer's extra light to 1.

------------------
~ Vader's Corner (http://www.vader.co.nr/) ~

Daft_Vader
07-27-2004, 03:32 PM
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 (http://www.vader.co.nr/) ~

JediKirby
07-27-2004, 05:04 PM
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.

gbk
07-27-2004, 05:19 PM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)

gbk
07-27-2004, 05:22 PM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)

Daft_Vader
07-27-2004, 08:26 PM
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 (http://www.vader.co.nr/) ~

gbk
07-27-2004, 09:40 PM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)

Daft_Vader
07-28-2004, 08:29 AM
So does that mean, I can't use light 0.0 ?

------------------
~ Vader's Corner (http://www.vader.co.nr/) ~

gbk
07-28-2004, 04:03 PM
Why do you want to?

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)

Daft_Vader
07-28-2004, 07:40 PM
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 (http://www.vader.co.nr/) ~

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.

gbk
07-29-2004, 06:58 AM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)

Daft_Vader
07-29-2004, 07:56 AM
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 (http://www.vader.co.nr/) ~

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.

Daft_Vader
07-29-2004, 09:20 AM
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 (http://www.vader.co.nr/) ~

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.

Daft_Vader
07-29-2004, 01:25 PM
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 (http://www.vader.co.nr/) ~

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.

gbk
07-29-2004, 07:24 PM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)

Daft_Vader
07-29-2004, 07:42 PM
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 (http://www.vader.co.nr/) ~

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.

gbk
07-30-2004, 07:03 AM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)

Daft_Vader
07-30-2004, 10:13 AM
# 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 (http://www.vader.co.nr/) ~

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.

Daft_Vader
08-04-2004, 09:50 AM
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 (http://www.vader.co.nr/) ~

gbk
08-04-2004, 03:38 PM
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.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)