Need your help yet again Created 5 years ago2019-04-27 16:18:31 UTC by NiX14 NiX14

Created 5 years ago2019-04-27 16:18:31 UTC by NiX14 NiX14

Posted 5 years ago2019-04-27 16:18:31 UTC Post #342521
Hello everyone, i need help yet again, so i made the elevator and its working fine no problems there, but how do i attach a light to it? doing ctl+t ties to entity but i can either keep light or func_train, and obviously func_train is the one i want to keep but as soon as i choose that, the light disappears, grouping them has no effect either. So is there a way of doing that or do i need to do it some other way. Also the same goes for elevator doors.
Posted 5 years ago2019-04-27 17:18:30 UTC Post #342524
You can't, I'm afraid. You'll have to stick with static point lights to do your lighting, the engine isn't remotely advanced enough to do anything dynamic.

You can add point lights by selecting the entity tool, and select "light". This tutorial will help.
Instant Mix Instant MixTitle commitment issues
Posted 5 years ago2019-04-27 18:02:46 UTC Post #342525
Keep in mind that light near brush entities (in the level editor) will light those entities in the world when spawned.

For example, if you have a func_train in a separate room and put light entities around it, and then spawn the func_train on a path upon loading the map, it will have those lights baked onto the texture.

This happens because when you compile the map with RAD, it only looks at things "statically" and bakes the light information onto textures.

This is true for elevators too. If you don't put a light inside the elevator, it will not be baked and therefore appear black (in case there's no light entities around). However, any players moving around a map will pick up the light onto their model (and viewmodel), so ensure to put lights across the path of an elevator to ensure that they are lit.
human humanblob
Posted 5 years ago2019-04-28 03:15:52 UTC Post #342526
Yup, as above. The lighting of the func_train (and everything else) is calculated when the map is compiled, and the train moving around other parts of the map will not change it. Similarly, if you were to put a texture light onto the train, it would only use that light where the train is upon compile.

Goldsrc doesn't do much in the way of dynamic lighting, so it's best try to build your maps in such a way that it isn't too noticeable.
Jessie JessieTrans Rights <3
Posted 5 years ago2019-04-29 10:45:21 UTC Post #342529
There are numerous tricks depending on what you are trying to achieve. One is this:
https://twhl.info/vault/view/6204

The other one is having the moving object lit elsewhere in the map and controlling switchable lights. One good example is subtransit deathmatch map from Valve. The train becomes darker when it's inside the tunnels and become brighter when it's outside. This is done by lighting the train in a separate room outside the map and controlling switchable lights with the "Target on pass" keyvalue in the func_tracktrain.

Also take a look at VHLT specific light_shadow entity.
Posted 5 years ago2019-04-29 13:28:11 UTC Post #342530
This is done by lighting the train in a separate room outside the map and controlling switchable lights with the "Target on pass" keyvalue in the func_tracktrain.
I never knew that... How delightfully hacky. Haha! Well played, Valve.
monster_urby monster_urbyGoldsourcerer
Posted 5 years ago2019-04-29 16:39:27 UTC Post #342533
Thank you all for answers, i managed to make it work :)

Also off topic: Anybody knows why when i use blue shift's client dll, my mouse gets locked in a box and i can't move it around but when i use half-life's client dll everything is normal. I remember i had this problem long time ago and i managed to fix it, i can't remember anymore haha.
Posted 5 years ago2019-04-29 18:30:36 UTC Post #342534
"my mouse gets locked in a box"
Turn off raw mouse input. This same problem is present in the latest Half-Life SDK.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 years ago2019-04-29 19:30:19 UTC Post #342535
Turn off raw mouse input. This same problem is present in the latest Half-Life SDK.
Yeah, i tried that, it dosen't work, i tried both from console and settings.
You must be logged in to post a response.