Jump to content

Recommended Posts

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 by PenguinPandaZero

Welcome!

Add the following code to your modmain.lua:

AddComponentPostInit("dynamicmusic", function(self)
	function self:StartPlayingBoating() end
	function self:StartPlayingSurfing() end
end)
Edited by alainmcd
politeness

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...