Turn Off Lights after complete objective ???

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Turn Off Lights after complete objective ???

Post by mcunha98 »

Hi,

I make a map with the objective: destroy a energy generator.
When the objective is completed, how i turn of lights and coronas in the map ?

I put for example a targetname into a light: "mylight1" and corona: "mycorona1".

Some idea how i turn off the light and hide the corona ?????? :(
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

$mylight1 light 0 0 0 0
$mycorona1 hide
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Green Beret wrote:$mylight1 light 0 0 0 0
$mycorona1 hide
AHA !!!!!
Ok, i will try this solution and post a reply if works !

Thank very mutch
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Dont work !

I put the targetname only in light - dont work
I put the targetname and #set for group (1 in my case) - dont work

The debugger in console show messages of error, what is the problem ???

Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Sorry, I thought you wanted this for script side, Your doing this through Radiant.
Would probally be alot easier to script it. 8-)
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

The light from light entities you add in radiant get compiled into the bsp they can't be changed after you compile your map . Green Beret is right you have to use dynamic lights by setting the light key on a model like fx/dummy.tik those type of lights can shine though walls if you set the radius too high though because they are not compiled they are spawned . This test map I made uses dynamic lights to simulate a traffic light . The pak has the .map in it if you want to look at that .

bdb_traffic_light.pk3

Image
Image
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

bdbodger

Thanks, i download your pk3 and see more later.

Thanks again !!!!
Post Reply