SteamVR

SteamVR

SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
Learn More
How to trigger sounds in less than a second.
Hi, I'm working on a project, for a SteamVR Environment. I'm trying to make a working drum machine. Right now, it loops through the sounds, but it seems, as if, the sounds get triggered after a second. Is it possible to make them be triggered, in, say, half, or a quarter, of a second? I'm using point_soundevents.
< >
Showing 1-14 of 14 comments
Rectus 13 21 Mar, 2021 @ 9:00am 
Does the soundevent itself have a delay parameter in it? If so, maybe remove it and add the delay in the entity output used to trigger the sound instead.
Nolan the Fox 8 21 Mar, 2021 @ 9:06am 
Originally posted by Rectus:
Does the soundevent itself have a delay parameter in it? If so, maybe remove it and add the delay in the entity output used to trigger the sound instead.
Yeah, I have buttons, that when toggled on, play the sound. The way I've set it up is, the first soundevent gets triggered at spawn, then, once the sound finishes, it triggers the next one. The sound itself doesn't, or shouldn't, have any delay after the end. I've tried setting the delay to 0.01 and it still plays it at the same delay.
Nolan the Fox 8 21 Mar, 2021 @ 9:07am 
I've also tried setting the delay to zero, or removing it, it still plays after a second.
Rectus 13 21 Mar, 2021 @ 9:12am 
If you want to have precise control over the delays, it might better to use a timer to trigger the next sound than relying on the end output.
Nolan the Fox 8 21 Mar, 2021 @ 9:15am 
Originally posted by Rectus:
If you want to have precise control over the delays, it might better to use a timer to trigger the next sound than relying on the end output.
Ah, ok. I was thinking of something like that. So for each sound, when it finishes the sound, it would trigger a timer, which would trigger the next sound?
Rectus 13 21 Mar, 2021 @ 9:21am 
Add the sound duration to to the timer value and trigger it when you trigger the start of the sound instead, that way you can control when the next sound plays in any circumstance.
Nolan the Fox 8 21 Mar, 2021 @ 9:24am 
Originally posted by Rectus:
Add the sound duration to to the timer value and trigger it when you trigger the start of the sound instead, that way you can control when the next sound plays in any circumstance.
Ok, thanks.
Nolan the Fox 8 21 Mar, 2021 @ 9:28am 
Now it's just looping the sounds at the start... I haven't wired them all up but you can hear them playing faster either way.
Last edited by Nolan the Fox; 21 Mar, 2021 @ 9:29am
Nolan the Fox 8 21 Mar, 2021 @ 9:31am 
Oh, I think I know why. I think the timer continues to trigger, even after the sound finishes, so of course it would loop. I just need it to trigger it once, only when the sound finishes playing.
Nolan the Fox 8 21 Mar, 2021 @ 9:36am 
Sorry, I also have kind of an unrelated question, I'm working on an old map I was working on before, I have a custom tool in it that is rotated 90 degrees to the right when you hold it in your hand. Is there a way to fix this?
Rectus 13 21 Mar, 2021 @ 10:59am 
Add an attachment point called vr_controller_root to it in the model editor, and rotate it in the opposite direction.
Nolan the Fox 8 21 Mar, 2021 @ 11:01am 
Originally posted by Rectus:
Add an attachment point called vr_controller_root to it in the model editor, and rotate it in the opposite direction.
Ok, thanks. Sorry, another random question, how would I change the skin of an object through inputs / outputs?
Oh, and is there a way to have something like a vr_teleport_area, but instead of it letting you only teleport on it, it would still allow you to teleport anywhere else? I have some stairs that I can't go up but adding in one of these means I can't teleport anywhere else.
Last edited by Nolan the Fox; 21 Mar, 2021 @ 11:05am
Rectus 13 21 Mar, 2021 @ 11:07am 
Use the Skin input with the number of the skin, starting from 0.
Nolan the Fox 8 21 Mar, 2021 @ 11:13am 
Originally posted by Rectus:
Use the Skin input with the number of the skin, starting from 0.
So just type in Skin for the input, and 0 for the parameter?
Oh, thanks, I just realized, the thing I was trying to change the skin for was still set to a prop_static. I needed to change it to a prop_dynamic, don't know how I forgot that.
Last edited by Nolan the Fox; 21 Mar, 2021 @ 11:20am
< >
Showing 1-14 of 14 comments
Per page: 1530 50