Jump to content

Home

Motion Light Tutorial


Obsidian-Jovani

Recommended Posts

Motion Light Tutorial: by Obsidian-Jovani

===============================

 

This method involves a little misdirection. To have an area that has "motion lights" you need to do these simple steps. Make normal light entities in your area. Then in that area give all of lights the same targetname, such as motionlights. Then in that same area create a trigger brush the same size as the area bounded by the walls, floor, and ceiling. Make this into a trigger_once (unless you want the lights to go off again then make it a trigger_multiple) and give it a target key and motionlights value. Then check the "PLAYERONLY" box. This will switch your lights on and off when the player enters the area.

 

Here is where the misdirection comes into play. With this method the lights will already be on before you even enter the area. To get the desired effect that we want the lights should be turned off. So to do this just create another trigger brush and make it a trigger_once and give it a target key and motionlights value. Again you should check the "PLAYERONLY" box. Now place this trigger in a place where the player must pass through to get to your motion light area. By doing this the player will walk through the trigger and turn the lights in that area OFF. Then when the player gets to the area it is dark, and then when he walks in ... presto! Lights ON. That's all there is to it. Simple eh.

Link to comment
Share on other sites

coool thats the sort of thing id do =]]

 

but one question where are motionlights in jk2radiant ??

 

ive seen dynamic lights that only seem to light the player and NPCs but no motion light ?

 

Oh is there also any way to get a shader to light up when entering a room

I guess raven never added that though cause its probably immpossible

Link to comment
Share on other sites

Well there is actually no "motion light" entity. It just involves normal light entities. Just make your light or lights and proceed with the following:

 

In your area where the lights you want to come on give them all the same targetname, such as motionlights. Then in that same area create a trigger brush the same size as the area bounded by the walls, floor, and ceiling. Make this into a trigger_once (unless you want the lights to go off again then make it a trigger_multiple) and give it a target key and motionlights value.
Link to comment
Share on other sites

Yep i tried that

 

Ive got a light with a unique targetname

then the trigger once has the same for its target as for any trigger.

 

the trigger now has player only selected

 

and the light has start off thing checked.

 

ive made the one light green to tell the difference, but on playing the level before i get to the trigger the light is already on. this means that the start off button doesnt do bugger all ..

 

i cant be doing anything wrong. this is the only side of radiant that goes wrong.

Link to comment
Share on other sites

You can do it through a script too, if Radiant or the compiler doesn't want to cooperate. Let's say the targetname of your lights is mylights, in a script

 

//Generated by BehavEd

 

rem ( "comment" );

use ( "mylights" );

 

Make the trigger target a target_scriptrunner and run a script that manipulates the lights. If you have a trigger_multiple don't forget to put count -1 in the target_scriptrunner entity window to run the script multiple times.

Link to comment
Share on other sites

the light has start off thing checked.

 

ive made the one light green to tell the difference, but on playing the level before i get to the trigger the light is already on. this means that the start off button doesnt do bugger all ...

 

I've never tried that start_off check box before. But the method that I metioned earlier should work because I did that and it worked good.

Link to comment
Share on other sites

ok i did exactly what you said.

got a trigger once with a motionlight value for the target

 

then the lights targetname is motionlight

 

made two, one as ya enter area one to turn light on

 

but neither did anything the light never turned on or off, it just remains lit..

ive never in my 2 years with radiant been able to turn lights off and on ?

i can get 10 laser doors to close at a given time but this simple thing refuses to work.

 

i even did that script idea and still no luck ??

 

i do know exactly what to put in my map as ive shown proffessional map makers the map. but the light just wont turn off and on.

Link to comment
Share on other sites

I'm not doubting your mapping skills or knowledge, because you're more advanced than I am, but there's got to be a rational explanation for this. Have you tried compiling it with sof2map? Maybe you should reinstall Radiant. Doesn't make sense. Every idea posted here works. Maybe the light entities definition is corrupt or something.

Link to comment
Share on other sites

yep ( iwouldnt make that kinda mistake HE HE HE :D )

 

mr Judge will hopefully emial me an example so i can try it to see if my radiants properley configured

 

oh Dinamic lights work

EG turn off and on but only light up the actual player. Is this proper as ive got no frame of reference to state otherwise ?

Link to comment
Share on other sites

a haa ;)

 

i now know the problem

 

your bsp ya sent me worked perfectly

 

i then loaded the map ya made and it is exactly like i made mine :D

 

so i compiled yours with q3map2

 

and it didnt work ???

 

sooooooo

could ya mail me how your bsp properties is set up for your full vis

then i can copy and paste it into radiant and

i can try that to see if ive set mine up wrong =]]

 

thats probably why my light looks crap to LOL

Link to comment
Share on other sites

I couldn't really understand that tutorial. Not because I don't know about editing, but because it was poorly worded and never really says what a "motionlight" is. Could someone go into detail?

Link to comment
Share on other sites

Simply put, it's about making lights that can turn on and off which you must already know how to do. "Motionlights" is misleading, when I first looked at the thread I thought it was about spotlights like the ones on artus_mine. I haven't had time to try those yet. Has anyone?

Link to comment
Share on other sites

Yepp, to be more exact, it describes how to make lights which automatically turn on or off when you enter a specified area.

 

The tutorial says: make several light entites, give them the same targetname (they become dynamic), check the START_OFF spawnflag for them, then make a trigger_once (to turn them on) or trigger_multiple (to be able to turn them on and off), give them the lights' targetname as target, then check the PLAYERONLY spawnflag to disable NPCs switching the lights.

 

It is for SP only, because dynamic light doesn't work in MP.

 

However I can't fully agree with the explanation of the trigger_multiple idea, because one trigger_multiple can't make a real so called "motionlight", because you should walk in the area to turn them on, then walk in again to turn them off. Plus what if I stand still in the middle of that trigger? So I think more triggers and a little scripting is needed to make a "motionlight" which turns off automatically when you leave the area.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...