Author Topic: Lightning goes on and off - Possible?  (Read 5674 times)

CorSair

  • Posts: 430
  • Turrets: +14/-0
Lightning goes on and off - Possible?
« on: July 10, 2010, 10:36:25 am »
I'm trying to create corridor with, lets say.... five lights. And they will turn on, when you pass through certain trigger. When you move through first trigger, light goes on. When you move to next trigger, light goes off behind you, and light in front of you lits. And process repeats. And to add some fun, humans are the only ones to activate this.

So, how I can make this happen? Or is it possible?

DraZiLoX

  • Posts: 844
  • Turrets: +24/-24
Re: Lightning goes on and off - Possible?
« Reply #1 on: July 10, 2010, 10:38:45 am »
Ive seen "broken" lights in metro and waveform. I think its made with shaders. But on and off :-ooo ???

Knowitall66

  • Posts: 492
  • Turrets: +70/-52
Re: Lightning goes on and off - Possible?
« Reply #2 on: July 10, 2010, 11:10:27 am »
No, I'm afraid it's beyond the capabilities of the engine.
The effect you want could however be achieved with moving walls (You have a lit section of wall and unlit that replaces it), mightn't look to good though and the player models would still be lit the same.

Though I'm curious, what is this for? A haunted house map?

God, maker of the world

  • Guest
Re: Lightning goes on and off - Possible?
« Reply #3 on: July 10, 2010, 01:14:46 pm »
Yes, it can be achieved that the actual map walls get brigher or darker just as if the light shining on them goes brighter and darker (and I am not talking about a simple bright-dark-shader-fade effect as e.g. the energy bridges in Uncreation use it).

This effect is used at least in Pulse and RushHuman(aka HardLanding). I don't know how it is achieved, and I would also like to know how.

My guess is that it's a shader effect which would probably not allow to apply the usual trigger mechanics on it in any way. But I don't know.

The trigger you're looking for (but maybe can't use for this, as said) is trigger_equipment without actually giving it an "equipment" key/value pair because you want all humans to be affected.

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Lightning goes on and off - Possible?
« Reply #4 on: July 10, 2010, 02:07:49 pm »
I think the one used in pulse is simply a light shader with a looooong square wave.

EDIT: http://q3map2.everyonelookbusy.net/shader_manual/ch3.htm#lightstyle
and look at pulse.shader and pulse.map, the lightstyles are defined in worldspawn, for example: key = "_style1rgbGen" value = "wave sin 0 1 0 0.5".
« Last Edit: July 10, 2010, 02:31:35 pm by UniqPhoeniX »

CorSair

  • Posts: 430
  • Turrets: +14/-0
Re: Lightning goes on and off - Possible?
« Reply #5 on: July 11, 2010, 06:22:57 pm »
Bleh, I can't finish those. :P I need to leave tomorrow, and i'm away least 2 weeks from my pc/laptop.
If someone can make those, i'm really grateful. I would test, but like I said, no time for it....
Though I'm curious, what is this for? A haunted house map?
It's sort of show-off of my skills. Trying see what NetRadiant and Quake engine can do... And of course, make map look cool and is still playable and balanced too. And no specific theme yet.

n.o.s.brain

  • Posts: 339
  • Turrets: +1337/-24
    • youtube page
Re: Lightning goes on and off - Possible?
« Reply #6 on: July 27, 2010, 11:59:51 pm »
I did some halls like that in blackout, were there is a light switch that can turn on and off the lights along a hall section. I used two sets of walls lighted differently, and made into doors.  It doesn't require AMP to work either. Just a bit tricky to get the lighting to look nice, and yes, the models will be lit according to the original state of the lights in the room.

Thorn

  • Guest
Re: Lightning goes on and off - Possible?
« Reply #7 on: July 31, 2010, 09:22:20 pm »
great, gg removing the delete post button

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Lightning goes on and off - Possible?
« Reply #8 on: July 31, 2010, 09:43:53 pm »
great, gg removing the delete post button
My fault.
U R A Q T

Aelita

  • Posts: 743
  • Turrets: +147/-34
Re: Lightning goes on and off - Possible?
« Reply #9 on: August 02, 2010, 01:17:57 am »
No, I'm afraid it's beyond the capabilities of the engine.
The effect you want could however be achieved with moving walls (You have a lit section of wall and unlit that replaces it), mightn't look to good though and the player models would still be lit the same.

Though I'm curious, what is this for? A haunted house map?
Even quake1 had flashing lights. I don't remember the parameter for the light exactly but it's something simple.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Lightning goes on and off - Possible?
« Reply #10 on: August 02, 2010, 11:11:05 am »
You could create fake lightmaps(lol, oxymoron) as real textures you use in a shader, and apply them as decals to the walls(patch meshes with polygonoffset). Make them into a func_train which has a REALLY high speed, and make them move in or out of the map when you press the button.

The difference with these textures would be that you use the blendFunc add instead of filter, which is what lightmaps use.

Thorn

  • Guest
Re: Lightning goes on and off - Possible?
« Reply #11 on: August 02, 2010, 01:42:33 pm »
No, I'm afraid it's beyond the capabilities of the engine.
The effect you want could however be achieved with moving walls (You have a lit section of wall and unlit that replaces it), mightn't look to good though and the player models would still be lit the same.

Though I'm curious, what is this for? A haunted house map?
Even quake1 had flashing lights. I don't remember the parameter for the light exactly but it's something simple.

Yes _lightstyles do that, however they cannot be triggered.