Norfeder Posted May 27, 2018 Share Posted May 27, 2018 I want a custom music track only play for the one who do the action. I tried to use TheFocalPoint but my friends told me they can still hear the music even they're using different characters. TheFocalPoint doesn't seems to with in character.lua RemapSoundEvent( "dontstarve/characters/mycharacter/music", "sound/mycharacter/music" ) local function playmusic(inst) if inst:HasTag("shouldplaymusic") then TheFocalPoint.SoundEmitter:PlaySound("dontstarve/characters/mycharacter/music", "mymusic") inst:RemoveTag("shouldplaymusic") elseif inst:HasTag("shouldstopmusic") then TheFocalPoint.SoundEmitter:KillSound("mymusic") end end local common_postinit = function(inst) inst:DoPeriodicTask(1, function() playmusic(inst) end) end Any help would be greatly appreciated! 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