lfnetwork.com mark read register faq members calendar

Thread: Motion Light Tutorial
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 05-04-2003, 12:54 PM   #1
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
Lightbulb Motion Light Tutorial

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.


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"

Last edited by Obsidian-Jovani; 05-11-2003 at 10:00 PM.
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-11-2003, 07:58 PM   #2
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
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


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-11-2003, 09:58 PM   #3
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
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:

Quote:
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.


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-12-2003, 02:44 PM   #4
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
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.


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-12-2003, 05:00 PM   #5
War Master
 
Join Date: Jul 2002
Location: On the battle field
Posts: 212
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.
War Master is offline   you may: quote & reply,
Old 05-12-2003, 09:00 PM   #6
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
thanks m8 ill try that =]]


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-12-2003, 09:13 PM   #7
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
Quote:
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.


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-13-2003, 05:15 AM   #8
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
The only difference is that you use sof2map and LDJ uses Q3Map2 which inlcudes dynamic light support from 2.5.3.


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 05-13-2003, 04:29 PM   #9
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
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.


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-13-2003, 04:43 PM   #10
War Master
 
Join Date: Jul 2002
Location: On the battle field
Posts: 212
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.
War Master is offline   you may: quote & reply,
Old 05-13-2003, 06:22 PM   #11
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
If nothing works I still can send you a sample map which works for me.


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 05-13-2003, 08:16 PM   #12
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
yeah leslie that would be cool

then at least i could see if everything is ok with radiant first...

my emial is
philip.thejedi@ntlworld.com

and that is also my MSN


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-13-2003, 08:18 PM   #13
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
ive also had a cool idea for my map. What if i released two versions ??? one as normal. then one for adults with a little more agressive comments from the reborns. Just for a comical effect =]


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-13-2003, 09:47 PM   #14
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
Troubleshooting
--------------------
Does your triggers (to turn off and turn on) have the "Playeronly" check box selected?

Do all the lights that you want to turn on and off have the same targetname motionlight?


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-14-2003, 02:29 PM   #15
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
yep ( iwouldnt make that kinda mistake HE HE HE )

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 ?


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-14-2003, 03:16 PM   #16
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
The mail is sent with the sample .map and .bsp.

Btw: I didn't checked playeronly for the test but there is no NPC after all.


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 05-14-2003, 04:56 PM   #17
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
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

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


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-14-2003, 08:47 PM   #18
Livingdeadjedi
 
Livingdeadjedi's Avatar
 
Join Date: Apr 2002
Location: England
Posts: 276
well thanks to Leslie Judge
my lights in radiant work WOOOHOOO

buys a big Keg of beer =]]


LiVingDeAdJedi AOTC TC ( clonewarsmod) Senior map maker
Livingdeadjedi is offline   you may: quote & reply,
Old 05-15-2003, 10:21 PM   #19
Emon
Strong Bad's Henchman
 
Emon's Avatar
 
Join Date: Jan 2002
Location: The Massassi Temple
Posts: 3,468
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?
Emon is offline   you may: quote & reply,
Old 05-16-2003, 02:58 AM   #20
War Master
 
Join Date: Jul 2002
Location: On the battle field
Posts: 212
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?
War Master is offline   you may: quote & reply,
Old 05-16-2003, 05:17 AM   #21
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
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.


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 05-16-2003, 12:27 PM   #22
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
Quote:
So I think more triggers and a little scripting is needed to make a "motionlight" which turns off automatically when you leave the area.
Yeah, all you would have to do is create one more trigger on the way out of the room to turn the lights off. Simple to do.


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-16-2003, 12:37 PM   #23
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
Quote:
Originally posted by Leslie Judge
Plus what if I stand still in the middle of that trigger?
And what about this?


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 05-16-2003, 12:46 PM   #24
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
Quote:
Originally posted by Leslie Judge
And what about this?
Make the trigger to turn the lights on the same size as the room bounded by the floor, ceiling and walls.


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-16-2003, 06:39 PM   #25
wedge2211
Commander, Rogue Squadron
 
wedge2211's Avatar
 
Join Date: Jul 2002
Location: Ithaca, NY
Posts: 2,320
Leslie's question still holds. When standing in the big trigger, the lights will switch on and off every time the trigger cycles.


wedge2211 is offline   you may: quote & reply,
Old 05-16-2003, 09:17 PM   #26
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
Quote:
Originally posted by wedge2211
Leslie's question still holds. When standing in the big trigger, the lights will switch on and off every time the trigger cycles.
If that trigger is a trigger_multiple then it probably would. There could be another way. It'll just take some creative thinking.


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-16-2003, 10:58 PM   #27
wedge2211
Commander, Rogue Squadron
 
wedge2211's Avatar
 
Join Date: Jul 2002
Location: Ithaca, NY
Posts: 2,320
Here's an idea:

1) Make a trigger_multiple that covers all the entrances to the room, INSIDE the room. This means either make one brush that fills the entire volume of the room or make multiple brushes in front of all the doors, then make them into one trigger.

2) Create a target_activate entity. Target the trigger at this, then target the targer_activate at all the lights. (Alternatively, you could use a target_scriptrunner with an activation script).

3) Create trigger brushes the cover all the entrances to the room, but OUTSIDE the room this time. Make them into one trigger_multiple.

4) Create a target_deactivate. Target the new trigger at this, then give this the same target as that target_activate (the targetname of the lights). (Or, use a scriptrunner with a deactivation script.)

All done...when you walk into the room (first trigger) the lights will go ON only, not toggle...when you leave (second trigger), the light will go OFF.


wedge2211 is offline   you may: quote & reply,
Old 05-17-2003, 03:25 AM   #28
Captian
 
Captian's Avatar
 
Join Date: May 2003
Posts: 32
(with a script) make it so that a door triggers the light when it opens. itll only work if doors are the ONLY way to get in. or, get a switch and make the player turn it on?
Captian is offline   you may: quote & reply,
Old 05-17-2003, 12:32 PM   #29
Obsidian-Jovani
 
Obsidian-Jovani's Avatar
 
Join Date: Apr 2003
Location: Onderon
Posts: 223
Good ideas.

See what happens with creative thinking. Just about any problem there is can be solved (for SP anyways).


Binary Sunset Studios

WIP: A SP Project entitled "Resurgence"
Obsidian-Jovani is offline   you may: quote & reply,
Old 05-19-2003, 08:26 PM   #30
Emon
Strong Bad's Henchman
 
Emon's Avatar
 
Join Date: Jan 2002
Location: The Massassi Temple
Posts: 3,468
I rigged a fairly complex system of scripts and triggers for a system that would simulate the movement of plants as the player brushed by them. When you touched it, it would make one model invisible and switch to another with a tessellating shader. It would move for a second or two then stop, and only start again when you brushed past it again. Only trouble was, is that if the plant was large like a fern, moving around inside it looked strange because it didn't move.
Emon is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JO Mapping > Motion Light Tutorial

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:43 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.