Post your scripting questions / solutions here
Moderator: Moderators
Bilko
Colour Sergeant
Posts: 91 Joined: Sat May 24, 2003 3:06 pm
Location: UK
Contact:
Post
by Bilko » Fri Aug 01, 2003 10:30 am
Right, I've made a script/model as my light and it works fine, however, I've discovered that it shines through walls. Is there a way to change the colour of a normal light when a switch is triggered? Ive tried "$real_lights.color 1 0 0" and "$real_lights color 1 0 0" but with no success. Any ideas?
Bilko.
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Fri Aug 01, 2003 10:41 am
Try
$real_lights lightRed (value 0 to 1)
$real_lights lightGreen (value 0 to 1)
$real_lights lightBlue (value 0 to 1)
Bilko
Colour Sergeant
Posts: 91 Joined: Sat May 24, 2003 3:06 pm
Location: UK
Contact:
Post
by Bilko » Fri Aug 01, 2003 1:11 pm
no, no luck. I read somewhere that lights aren't entities, could it be that you can't assign a light a targetname?
Bilko.
Serph
Major
Posts: 278 Joined: Wed Jun 11, 2003 5:23 pm
Location: Barrie, Ontario Canada
Contact:
Post
by Serph » Fri Aug 01, 2003 1:38 pm
are you saying that the light goes through your walls?
if I'm right can't you just use sunblock?
~serph~
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Fri Aug 01, 2003 1:54 pm
You can't change the color of a point light (the one you place in Radiant) dynamically. This is because lightmaps are precompiled
.
I thought you were talking about dynamic lights
Bilko
Colour Sergeant
Posts: 91 Joined: Sat May 24, 2003 3:06 pm
Location: UK
Contact:
Post
by Bilko » Fri Aug 01, 2003 1:56 pm
Ahh, ok. Different way of looking at the problem. Is there a way to stop dynamic lights shining through walls or are we back to 'the wall doesn't know it's a light' etc?
Bilko.
ps. can u at least hide them, or not?
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Fri Aug 01, 2003 2:14 pm
A dynamic light can be 'hidden' with the lightOff command.
Example:
$light lightOff
Bilko
Colour Sergeant
Posts: 91 Joined: Sat May 24, 2003 3:06 pm
Location: UK
Contact:
Post
by Bilko » Fri Aug 01, 2003 3:12 pm
Sorry, I meant normal lights then, shoulda said. Anyway, seems impossible so I'll give up.
Thanks for your help JV.
Bilko.
SlasherZ
Colonel
Posts: 433 Joined: Fri Jul 11, 2003 12:55 pm
Contact:
Post
by SlasherZ » Fri Aug 01, 2003 4:51 pm
normal light color can be changed by key: color
Bilko
Colour Sergeant
Posts: 91 Joined: Sat May 24, 2003 3:06 pm
Location: UK
Contact:
Post
by Bilko » Fri Aug 01, 2003 5:10 pm
I mean in-game.
Bilko.