Any way to have moving laser pointers? Created 8 years ago2016-05-21 01:09:11 UTC by usbpetrock usbpetrock

Created 8 years ago2016-05-21 01:09:11 UTC by usbpetrock usbpetrock

Posted 8 years ago2016-05-21 01:09:11 UTC Post #330164
In HL2, there were blue dots which would show you where the snipers in the map were aiming. In HL1, this is not the case, but it would be extremely useful for my map. Does anybody know if this is possible in GoldSRC, and if so, how?
Posted 8 years ago2016-05-21 05:50:10 UTC Post #330168
Ones that follow you? Hmmmm...Maybe with Spirit of Half-Life. env_beam needs an end to work...maybe a single sprite, such as the RPG's laser pointer could be made to follow the player somehow, but this seems like a stretch.

Maybe making a light_spot and modifying it?

You could maybe even make it brush-based and passable....but it wouldn't be able to grow or shrink.
Posted 8 years ago2016-05-21 10:30:18 UTC Post #330173
I have no idea if this will work, and it probably won't, but try making the end target of an env_beam "player".

Otherwise vanilla almost certainly can't do it. Spirit, maybe.
Jessie JessieTrans Rights <3
Posted 8 years ago2016-05-21 18:59:30 UTC Post #330184
I think Jessie has right and it may work on vanilla, worth a test.
Posted 8 years ago2016-05-22 01:14:06 UTC Post #330190
Wouldn't it be able to reach the player through walls then?
Posted 8 years ago2016-05-22 02:36:27 UTC Post #330191
[Obligatory "if-it-works" clause]
Do trigger_changetargets change the end/start of an env_beam? If so, some clever use of those could decouple the beam.


I have conducted tests under the observatory eye of DiscoStu, and have discovered two things:
1) trigger_changetargets cannot alter the target of an env_beam. Disabling Smart Edit shows that neither the end nor start targets use the parameter "target"; this is likely why.
2) An env_beam set to target "player" neither follows the player nor targets him/her in any way. The beam defaults to targeting the map's origin.

Both these issues may have solutions in Spirit (indeed, the first can be worked around in vanilla), and while I could guess at how to solve the first, the second, far more significant issue I am less sure of.
Jessie JessieTrans Rights <3
Posted 8 years ago2016-05-22 03:13:57 UTC Post #330192
I have observed the above activities.
Posted 8 years ago2016-05-22 04:08:05 UTC Post #330193
The problem with having a beam following the player is that the sniper rifle doesn't move as fast as the player, which is how you dodge it. So if the laser is always pointing towards the player, it's wrong.

Seeing Half-Rats's suggestion, I asked badsniper365 (the coder for the team I'm on) to try and add the RPG dot to func_tank, and he said it was already in there, but commented out. He uncommented it and apparently it's working perfectly. We're using SoHL 1.8 for our code base, by the way.
Posted 8 years ago2016-05-22 04:15:34 UTC Post #330194
Perhaps you could make a realllllly long, semi transparent, 1-unit wide red beam tied to a func_tank and hope it's long enough for it to hit every surface in sight. This of course is a problem in that it will go through near walls anyway.
Posted 8 years ago2016-05-23 19:22:47 UTC Post #330204
Yeah, a func_tank, sith Render Mode set to Additive. As for the 'going-through-the-wall' problem, just pretend those are a new type of "see-through" lasers with an effect similar to polarization, but through stuff other than glass?
Admer456 Admer456If it ain't broken, don't fox it!
You must be logged in to post a response.