Jump to content

Dynamic lighting...


Recommended Posts

I'm working on a new map, and some of the elements are power generating buildings, along with various streetlights.

An idea I had for a mission element would be to plant a demo at each building, and then 'kill' the power plant, thereby turning off the lights...

Can this be done via scripting? Or is it a map function?

Or am I just dreaming again? :blink:

Link to comment
Share on other sites

This is an area I'm not too clear about, but AFAIK the lighting on a map is hardwired into the map during the map making/lighting phase and cannot be swtched on or off via IGOR. :huh:

But if you are making a custom map from scratch, a work-around idea is to make a few streetlights, then stick an unrendered spotlight-type or vehicle-headlight-type <n><dyn> object into each streetlight.

I'm guessing that i) you can hide the spotlight via scripting like you would hide doors etc and ii) the light it produces hides with it. :hmm:

Just an idea I never tested. Don't know whether it'll work, though. :D

Edited by The Worm
Link to comment
Share on other sites

Well, I managed to "Hide Map Object" the spotlights in POW Camp via scripting, and the lights went out with it...

So all you have to do now is figure out a way to make non-moving (or barely moving) spotlights that actually work... BornToKill made a couple o' spotlights


Link to comment
Share on other sites

Come to think of it...does any scripter know what these commands do?

--Room lighting--


"The lights are on in <room>"


"The lights are off in <room>"


"The room containing <location>"

Are these commands by any chance connected to the banking of lights in the lighting-tool?

If not, what lights are they talking about then?

Link to comment
Share on other sites

Wotcha Dee :D

The "Lights" command allows the turning on/off of certain lights...suprise, suprise. :devil:

Some maps, (no, can't remember any examples) have lights in the rooms that can be switched via Igor. I think MP05Castle has a couple of rooms where there are lamps that can be switched.

Link to comment
Share on other sites

Hi Nex, good to see you back!

Well, I know the commands affect lights...but what or which "lights" exactly?

You've got the dynamic lights generated in the lightingtool:

Those lights create a lightbeam that affect dynamic objects, like actors.

They also are used to create a darkmap which is saved seperatly.

These lights are contained within a certain room and can be "banked".

I guess the lights can be switched on or off so they do not light dynamically anymore , but does that affect the (pre-calculated) darkmap?

There are also light-flares (helperpoints):

They don't produce any light at all, but simply mimic the effect of a light's glare.

Those are grouped with a room in the map itself.

An lastly, there are textures with a luminance:

These don't generate light either, but mimic light or a luminating object.

Things like lightbulbs, lightfictures, fire, candles, etc, etc.

These textures are grouped within a room aswell.

Link to comment
Share on other sites

This is a great discussion, maybe we'll get lucky and someone in the know will jump and fill the gaps.

I thought the 'lights on' & 'lights off' "commands" where actually querys under 'continue if'. Where are they available as commands?

As far as the darkmaps, I would imagine the darkmap maker would create two seperate darkmaps for the two states. I've noticed that it will add multiple rooms on one darkmap rsb, perhaps it does the same for the seperate states.

It states in the PDF that the banks are there specifically for lights to have two states. But that's all it says about it. IIRC

I'm going to take a look at the specific tagging of a spot light, and try to create some lights that don't rotate, but with the same tagging. Perhaps there may be a work around or some answers there, as spot lights do indeed go out when destroyed.

I suppose the real question is how to trigger the change in banks, yes? Once we have that, the rest is a simple matter of testing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...