My experiment Created 15 years ago2008-07-29 20:44:08 UTC by Kissker Kissker

Created 15 years ago2008-07-29 20:44:08 UTC by Kissker Kissker

Posted 15 years ago2008-07-29 20:57:25 UTC Post #253149
So in source I decided to get too involved lol.

I never did anything like this in previous, so I have NO clue if there is an easier way, and please, for the love of god, if there is, tell me!

On the fallout 2 opening that I showed, showing the vault door movement you may or may not notice the cage light that turns on, rotates, and gives the general alarm noises as it opens. (Its a yellow light on the left side :P) Much like a siren.

So... can it be replicated?

Answer- Sort of.

By using 2 groups of 6 light_spot, cleverly named 1_1, 2_1, 1_2, 2_2 and so forth , I have found a way to simulate the movement.

First off make a light_spot, give it a name and a number, 1_1 in my case, then mess with its colour and brightness, mine is a faint yellow. Set flag to 'initially off' Then, copy this and paste it, rotating so it shines in the opposite direction as the first, then rename it to 2_1.

MAKE SURE THEY ARE NOT TOUCHING this causes them to seem 'too close' once done.

Now the fun part, select both lights, and copy them, paste - not on top of the others! and rotate them (I highly recommend having hammer set to 15 degree intervals for this!) 2 'clicks' and my next position is set, rename them 1_2 and 2_2 and those are done- for now. Repeat 4 more times, renaming as you go, and making sure you move them OFF of one another. The goal here is a very even pattern, meaning if you move 30 degrees for one side, move 30degrees for the other.

Once you have your "string of lights" make yourself a func_button someplace close by.
Once you have done this, save a backup, just in case. Picking the lights out after you make them on the same plane (So it looks like a light is rotating and not spiraling accross a room- unless you want it to spiral :p)
Then select 2_1, 2_2 and move them on top of 1_1, and 2_1, in my case on the top view plane (so the light doesn't shine into the players eyes, but around its point of view), then repeat with the other lights, until all of them are a big circle of lights on your view from the side. (again screen shots would help here...)

This is where the crazy amount of hard work comes in, yes, that up above was the "easy" part.

In the button, on output, you will need to type, a lot, of stuff. Namely like this:

OnPress
1_1
TurnOn
0.00

OnPress
2_1
TurnOn
0.00

OnPress
1_2
TurnOn
0.10

OnPress
2_2
TurnOn
0.10

OnPress
1_1
TurnOff
0.10

OnPress
2_1
TurnOff
0.10

If you just left it at that, and compiled the map, this would happen when you pressed the button.

Instantly the first 2 lights would shine on, then 0.1 seconds later they would turn off, as the next set turns on, giving the illusion that the lights rotated your set degrees (30 degrees in my case). You have to complete all the way to 1_6 and 2_6 to get a FULL rotation.

It's a lot of work, but it has some wonderful eye appeal afterward, as long as you take the time to position it well, and set the spotlights angles to fit your area and all that. The space 'in the middle' of the lights should be at least 2 units, back of light to back of light, so that no odd overlaps occur.

I will try to submit screenshots and perhaps a link to a working movie of it to show it off, but as it is, I am only at 0.8 of my combo, when I want about 3.0 seconds worth. Lol. 4 lines of output per tenth of a second, lots of work, so again, if anyone has a better/faster/easier way to do this, I am all ears.

With this idea in mind, you could create Moving lights- in game they would appear to move, but in reality one is turning off instantly as another turns on.

Remember the flashing lights of the old movie theater highlight board? where 1 would turn on, then the one next to it, then the one after it would turn on, and the first one would turn off, giving the illusion that the 'line of lights' were moving? That's where I got the idea.
Posted 15 years ago2008-07-29 21:16:47 UTC Post #253150
While this way does simulate the lighting, it would look pretty choppy. The easiest and cheapest (performance-wise) way of doing this would be to parent point_spotlights to an invisible rotating box and turn them on via the button/trigger.

Point_spotlights have a dynamic light too, which would look just as choppy and lower the performance, I'd disable that in the flags and just use the spotlights sprites to simulate the effect.
4 lines of output per tenth of a second, lots of work, so again, if anyone has a better/faster/easier way to do this, I am all ears.
You can copy and paste I/O commands. Select a group of them, hit copy, and paste the whole lot, then just alter the time parameters. Still a ridiculous amount of work, though.
Strider StriderTuned to a dead channel.
Posted 15 years ago2008-07-29 22:35:01 UTC Post #253151
Yea its a tad 'choppy' just wish I knew another way to do it.

As for the light to point at the func_rotating they don't seem to follow it as it rotates... don't know if you have ever done it, but I don't think that works.
Posted 15 years ago2008-07-30 02:49:19 UTC Post #253160
I'm talking about point_spotlights, not light_spot's. It definately works, it's a fairly common technique in Source mapping.

I really don't like tooting my own horn, but if there's one thing I know more about than anything else in Source, it's lighting. :)
Strider StriderTuned to a dead channel.
You must be logged in to post a response.