HinikuHou Posted February 5, 2018 Share Posted February 5, 2018 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 Link to comment Share on other sites More sharing options...
alainmcd Posted February 5, 2018 Share Posted February 5, 2018 Welcome! Add the following code to your modmain.lua: AddComponentPostInit("dynamicmusic", function(self) function self:StartPlayingBoating() end function self:StartPlayingSurfing() end end) Link to comment 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 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 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 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.