Forum

Time-able, on-off, lights

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Time-able, on-off, lights

Postby ajay » Wed Mar 31, 2010 8:54 am

Before I waste an inevitably large amount of time failing to get it working, I thought I'd check if it was possible or had already been done.
Basically I'd like to have a light entity that can go on and off, adjustable within the editor in terms of time (e.g. switch on for 5 seconds, then off for 10 etc) and, as usual, brightness. Colour would be could as long as not engine dependent.

Possible, doable, done?

Cheers.
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Postby Teiman » Wed Mar 31, 2010 11:58 am

I could be wrong, but I think is possible to change the lightstyle of areas dinamically. So yes, you can have triggers that change light (there was a lot of that in Doom 1, so I suppose Quake1 has it too).

A very very very very very very cheap way to do it, is with a null.mdl entity set to EF_DIMLIGHT, and toggling that attribute. But that will be ...dynamic, hence expensive (It feel exponentially more expensive the more dinamics lights you have), and of limited utility (not control of color or fallout) ..

So yes, doable, maybe even "easy".
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Spike » Wed Mar 31, 2010 2:49 pm

If it has its own lightstyle number, you can change the lightstyle string for that light as you see fit. So yeah, you can change it every 5/10 seconds from QC, affecting just that light.
By ramping up through the alphabet, you can get lights that turn on slowly or not.

Alternatively, note that lightstyles animate at 10 chars per second by default. 100 chars and you have a light that switches on every 10 seconds.

KTX actually changes the light level on style 0, which globally affects all (default, anyway) lights, to provide a fade-in effect just before the match starts.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest