Sneaky Axolxtl Posted April 4, 2022 Share Posted April 4, 2022 I made a playermod for the youtuber OrangE and someone suggested making him say "Hello Everyone" upon spawn and I really want to do that. How??? yt5s.com - Hello Everyone - OrangE Soundbite #1 (128 kbps).mp3 Link to comment Share on other sites More sharing options...
-LukaS- Posted April 5, 2022 Share Posted April 5, 2022 Assuming you want your character to play this sound whenever it appears in the world you can simply put: inst.SoundEmitter:PlaySound("your_sound") in your characters fn() after: if not TheWorld.ismastersim then return end This way your character will play your sound every time it joins a server or switches from surface to caves and vice versa. If you want to play the sound only when your character is created (so only play the sound once) you would need to listen for the "ms_newplayerspawned" event and play the sound then. 1 Link to comment Share on other sites More sharing options...
Sneaky Axolxtl Posted May 18, 2022 Author Share Posted May 18, 2022 On 4/5/2022 at 7:11 AM, -t- said: Assuming you want your character to play this sound whenever it appears in the world you can simply put: inst.SoundEmitter:PlaySound("your_sound") in your characters fn() after: if not TheWorld.ismastersim then return end This way your character will play your sound every time it joins a server or switches from surface to caves and vice versa. If you want to play the sound only when your character is created (so only play the sound once) you would need to listen for the "ms_newplayerspawned" event and play the sound then. Hello i know this is MONTHS later but i'm not sure howto put this in? Link to comment Share on other sites More sharing options...
-LukaS- Posted May 18, 2022 Share Posted May 18, 2022 In your characters file you should have a function called 'fn()'. In this function there should be a piece of code that looks like this: if not TheWorld.ismastersim then return inst end Put 'inst.SoundEmitter:PlaySound("your_sound")' after that. From what you sent it seems your trying to play the '.mp3' file directly, which is not possible. You need to create a '.fsb' file using FMOD Designer. You can find it in your Don't Starve Mod Tools. If you don't know how to create sounds I recommend this tutorial: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now