Garry's Mod

Garry's Mod

Gmod Blueprints (Visual Scripting)
TobyCat 2 Feb, 2020 @ 1:02pm
Random Death Sounds (RESOLVED)
Hey, I'm making as little script for me and my friends that just plays a noise when you die- But i want to make it so when you die it's a different sound each time- How would i do this?

-

Also- Love your mod!
Last edited by TobyCat; 2 Feb, 2020 @ 2:03pm
< >
Showing 1-7 of 7 comments
80Hg 2 Feb, 2020 @ 1:40pm 
Assuming things are similar to how they are in written code, you'd be using a table.
Fill the table with all the sounds you need and when playing the sound pick a random one out of the table.
TobyCat 2 Feb, 2020 @ 1:56pm 
Thanks dude, But how would i randomize it? I know how to make a random number but how would i output a random element from the table?
Monkey 2 Feb, 2020 @ 1:59pm 
generate random number between 1 and # of elements in table. And that is your index to retrieve an element from the table.
TobyCat 2 Feb, 2020 @ 2:03pm 
Aye, Thank you both.
Lucille 7 Feb, 2020 @ 10:28am 
hey, im trying to do nearly the exact same thing, how did you set this up exactly? im not very good with this kind of stuff, but it sounds easier than setting up a custom tfa-vox script.
arninbu 12 Aug, 2021 @ 1:25pm 
Originally posted by Bump:
hey, im trying to do nearly the exact same thing, how did you set this up exactly? im not very good with this kind of stuff, but it sounds easier than setting up a custom tfa-vox script.
same
392189 17 Jan, 2022 @ 4:58pm 
How to draw things with gmod blueprints
< >
Showing 1-7 of 7 comments
Per page: 1530 50