HinikuHou Posted February 5, 2018 Share Posted February 5, 2018 (edited) I am currently designing a music mod for Shipwrecked and am trying to prevent the game's sailing/surfing music from playing. As is, the game's sailing/surfing music overrides the music I want to be playing so I'd like to prevent the music from triggering in the first place. I'm at my wit's end trying to figure this out and am willing to pay way more than some lines of code are worth via PayPal if someone can write some lines that accomplish this successfully; I just REALLY want this done. I've included my functioning (aside from the mentioned issue) .lua file in case it's helpful. (In the lua file, "continuous" mode is designed to make the modded music play endlessly instead of only while working. I also feel I should mention that this is a modified "port" of a RoG mod so there is a lot of unnecessary stuff in it.) modmain.lua Edited February 6, 2018 by PenguinPandaZero Link to comment https://forums.kleientertainment.com/forums/topic/87154-solved-disabling-sailingsurfing-music-in-sw/ Share on other sites More sharing options...
alainmcd Posted February 5, 2018 Share Posted February 5, 2018 (edited) Welcome! Add the following code to your modmain.lua: AddComponentPostInit("dynamicmusic", function(self) function self:StartPlayingBoating() end function self:StartPlayingSurfing() end end) Edited February 5, 2018 by alainmcd politeness Link to comment https://forums.kleientertainment.com/forums/topic/87154-solved-disabling-sailingsurfing-music-in-sw/#findComment-999994 Share on other sites More sharing options...
HinikuHou Posted February 5, 2018 Author Share Posted February 5, 2018 Thanks for the quick reply! That's close, but not quite what I need. Adding that results in the music stopping as opposed to not playing (which is a slight difference). The problem is that it still stops playing the current music upon jumping onto a boat where I'd like it to keep playing the current music as if nothing had changed. Link to comment https://forums.kleientertainment.com/forums/topic/87154-solved-disabling-sailingsurfing-music-in-sw/#findComment-1000102 Share on other sites More sharing options...
alainmcd Posted February 6, 2018 Share Posted February 6, 2018 Try AddComponentPostInit("dynamicmusic", function(self) function self:OnStartBoating() end function self:OnStartSurfing() end end) Link to comment https://forums.kleientertainment.com/forums/topic/87154-solved-disabling-sailingsurfing-music-in-sw/#findComment-1000289 Share on other sites More sharing options...
HinikuHou Posted February 6, 2018 Author Share Posted February 6, 2018 That worked. Thank you so much for your help! Link to comment https://forums.kleientertainment.com/forums/topic/87154-solved-disabling-sailingsurfing-music-in-sw/#findComment-1000324 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