Page 1 of 1

Turning Of Lights - With Explosions???

Posted: Fri Feb 21, 2003 9:31 am
by Shifty
In my map "War in a Hall" One of the Collums Blows up - on each Collumn I have a Caged Light would it be possible to turn this 1 light off when the collum blows up Because its a bit daft Blowing up a Bit of Collumn and Still HAving a working light.

Posted: Fri Feb 21, 2003 11:32 am
by TheStorm
I would say it's possible! There are tutorials on making working light switches so I guess it would be possible to change the script a bit so that the explosion turns of the light instead.

I haven't tried the light switch myself but people say it works, there is a tutorial about that over at TMT www.modtheater.com (I would have given you the link but when I wrote this I couldn't connect to TMT, site temporary down/slow maybe?)

I don't think the light switch thing actually turns of the light but it changes the color of it to black. Not sure though?!?

Posted: Fri Feb 21, 2003 11:56 am
by jv_map
Yes you can switch off light, although dynamic lighting is very poor. Also, you'll need a custom TIKI for the caged light with custom shaders, as the original uses rgbGen identity whereas you'll need rgbGen lightingSpherical.

Anyway, do a search for 'torch' ;).

Posted: Fri Feb 21, 2003 9:49 pm
by TheShiznaeSpe
you could just give the light a targetname and say $light remove

is that correct?

Posted: Sat Feb 22, 2003 7:38 am
by mohaa_rox
Yup, that should work. Maybe give a trigger_use with setthread "off" and in the script:
off:
$light hide
end

And on:
on:
$light show
end

Posted: Sat Feb 22, 2003 8:07 am
by jv_map
No it will not work. Lights aren't even entities.

Posted: Sat Feb 22, 2003 11:40 am
by Angex
Maybe you could use this in a script:

$light lightradius 0

Posted: Tue Feb 25, 2003 5:36 pm
by Valoche
Create a script_model object, with the following attributes:
model fx/dummy.tik
targetname mylight

Then in your script:
$mylight 1 1 1 360 // Switch the light on
$mylight 0 0 0 0 // Switch the light off

It's still poor, dynamic lighting, but it works.

Valoche

Posted: Tue Feb 25, 2003 6:28 pm
by Shifty
Thx Ill try that

Posted: Tue Feb 25, 2003 9:02 pm
by jv_map
Valoche wrote: $mylight 1 1 1 360 // Switch the light on
$mylight 0 0 0 0 // Switch the light off
Should be
$mylight light 1 1 1 360 // Switch the light on
$mylight lightoff // Switch the light off

Posted: Tue Feb 25, 2003 9:34 pm
by Shifty
What happens if I have a Corona there also can i trun this off? as that would truly give it the effect of being off?

Posted: Wed Feb 26, 2003 8:47 am
by jv_map
Give the corona a targetname, for example 'corona'. In your script, type:

$corona hide //--> to hide the corona (not sent to client either)
$corona show //--> show the corona again

Posted: Wed Feb 26, 2003 6:17 pm
by Valoche
jv_map wrote:
Valoche wrote: $mylight 1 1 1 360 // Switch the light on
$mylight 0 0 0 0 // Switch the light off
Should be
$mylight light 1 1 1 360 // Switch the light on
$mylight lightoff // Switch the light off
Oopsie my fault, used copy/type instead of copy/paste :)

Anyway, that was part of a tutorial I found somewhere on the web, and yes, there were coronas in the tut, too.

Valoche

Posted: Thu Feb 27, 2003 12:15 am
by Shifty
Thank ya i'll try it out - no doubt ill be back for quastions though lol