SteamVR
SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
了解更多
ChocolateResolve 22 2023 年 5 月 1 日 下午 6:55
Location-specific music
It's ya boi, Mr. "4 new topics in less than a month because I don't know what I'm doing."

What entity should I be using for location-specific music? As far as I can tell, ambient_generic and env_soundscape aren't supposed to be used for destinations, but the source for that information combined with my inability to figure things out on my own. I could be wrong. Is it some sort of logic coding tied to teleporters? I feel like that would run into issues with audio playing over itself. Is it a string of triggers? Any help would be appreciated as usual!
< >
正在显示第 1 - 2 条,共 2 条留言
Rectus 13 2023 年 5 月 2 日 上午 3:21 
The entity got renamed to snd_soundscape, but soundscapes are usable. Using them is the simplest solution, and they will handle starting and stopping the sound automatically. It will restart the music from the beginning if you leave one soundscape and come back to it though.

The other options involve using soundevents. One option is using trigger volumes do detect if a player is within the sound range, and using a snd_event_point to play/stop the sound. This would break down in multiplayer where you can have multiple players moving around. It's possible to play player-specific sounds, but you would need to use VScript instead, and the interface is still pretty limited.

Most of the options are documented here:
https://developer.valvesoftware.com/wiki/SteamVR/Environments/Adding_Sound
ChocolateResolve 22 2023 年 5 月 3 日 下午 8:34 
Thank you!
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50