Custom lasers

Avatar
Lpfreaky90
2,842 Posts
Posted Jul 14, 2011
Hey all,

I am currently working on a map where I want to use different colored lasers which only activate the catcher with the same color. To make it even worse: I'd love to combine different colors with some kind of prism.

However, I have no bloody clue where to start =/ so that's where I need some help: how can I get my hands on the scripts of the lasers so I can program my own? Or has someone already built this and can I copy this?

I hope someone can help me :biggrin:

Greetings,
~Lp

Advertisement
Registered users don’t see ads! Register now!
Avatar
Brits
39 Posts
Posted Jul 14, 2011
Replied 27 minutes later
Like in Incredible Machine?
Avatar
Lpfreaky90
2,842 Posts
Posted Jul 14, 2011
Replied 40 minutes later
I don't know what you mean :sad:

What I mean: I want two lasers, say red and blue, red activates a red laser catcher, blue activates a blue laser catcher.

Blue can't activate the red laser catcher and vise versa.
If the blue and red beam meet at a given point there will be a purple (red+blue) beam that will activate a purple laser catcher.

The point is: I have no idea where to start building custom lasers (which emit blue light for example)

Avatar
Skotty
671 Posts
Posted Jul 14, 2011
Replied 1 hour later
You could try if env_lasers are supported by the redirection cubes and portals. The normal lasers color is not changeable.
Avatar
ChickenMobile
2,460 Posts
Posted Jul 14, 2011
Replied 3 hours later

Brits wrote:
Like in Incredible Machine?

Oh my, Incredible machine was the shiz. And yes I'm guessing they mean that.

Can you change the 'color fx' property in the env_laser and create a filter for the laser catcher?

Avatar
Lpfreaky90
2,842 Posts
Posted Jul 14, 2011
Replied 1 hour later
The problem is that the laser in portal 2 is not env_laser, but it's env_portal_laser.
I could make a different (colored) model, and create a blue emitter, but still the laser won't be blue, so I guess I have to hard code it in an object that I have to create, which is actually a env_portal_laser with another color and another laser color (and probably some filters).

So... Any ideas on how I should start building something like that.
(or at least, how the hell shall I wreck everything apart so I can have access to the sourcecode of the env_portal_laser) :biggrin:

~Lp

Avatar
Soundlogic
169 Posts
Posted Jul 14, 2011
Replied 1 hour later
I believe that there is no way to modify the existing lazer without simply replacing the laser effect (which would still give you only one laser). I am hoping that valve will add a tool for adding brushes that extend like the laser/light bridge/etc, but unless they do that I don't believe there is any way to achieve this.
Avatar
Omnicoder
299 Posts
Posted Jul 14, 2011
Replied 1 hour later
I've done this and it's pretty complicated. I'll post an example once my map using it is done.
Avatar
Lpfreaky90
2,842 Posts
Posted Jul 14, 2011
Replied 2 minutes later
Very Nice :biggrin:
I'd love to see how you did it :biggrin:
Advertisement
Registered users don’t see ads! Register now!
Avatar
Soundlogic
169 Posts
Posted Jul 14, 2011
Replied 13 minutes later
Omnicoder, you are amazing. If you just took all the experiments you tried and uploaded them, I think everyone would love it. You figure out how to do amazing things.
Thank You,
Sound Logic