JaccK1618 Posted September 7, 2021 Share Posted September 7, 2021 So there is this mod called Return of Giants that adds the original Moose Goose and Dragonfly spawning mechanics. The issue is that the Moose Goose does not have a warning sound, but the Dragonfly does. Me and a friend on steam are trying to add the Moose Goose warning sound by copying the Dragonfly sound. Here are some screenshots; Original Dragonfly warning code in the mod: Moose Goose warning sound found in Reign of Giants files: Replacing the original Dragonfly code in the mod with the Moose Goose: Warning sound in prefabs: Is there anything that is wrong? Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/ Share on other sites More sharing options...
Monti18 Posted September 8, 2021 Share Posted September 8, 2021 What exactly is the error that you have? Just no sound at all? If that's the case, is it working if you just let the sound play like this? I mean with inst.SoundEmitter:PlaySound(sound). 1 Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1492241 Share on other sites More sharing options...
JaccK1618 Posted September 8, 2021 Author Share Posted September 8, 2021 The sound will not play. 14 hours ago, Monti18 said: What exactly is the error that you have? Just no sound at all? If that's the case, is it working if you just let the sound play like this? I mean with inst.SoundEmitter:PlaySound(sound). The sound won't play at all. I'll get him to try it. Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1492533 Share on other sites More sharing options...
JaccK1618 Posted September 8, 2021 Author Share Posted September 8, 2021 16 hours ago, Monti18 said: What exactly is the error that you have? Just no sound at all? If that's the case, is it working if you just let the sound play like this? I mean with inst.SoundEmitter:PlaySound(sound). He's asking if you put it into the modmain. Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1492581 Share on other sites More sharing options...
JaccK1618 Posted September 8, 2021 Author Share Posted September 8, 2021 17 hours ago, Monti18 said: What exactly is the error that you have? Just no sound at all? If that's the case, is it working if you just let the sound play like this? I mean with inst.SoundEmitter:PlaySound(sound). test1 Shared with Dropbox https://www.dropbox.com/sh/i4bnqpcqd3itcym/AADDcX_GT7GTVkAQllTMWtyda?dl=0 theres the entire code if you need it Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1492594 Share on other sites More sharing options...
JaccK1618 Posted September 8, 2021 Author Share Posted September 8, 2021 The warning sound will not work (Moose Goose) Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1492606 Share on other sites More sharing options...
Monti18 Posted September 9, 2021 Share Posted September 9, 2021 (edited) The problem is that the sound path is not correct. If you look at the code, you see that the path is always dontstarve_DLC001/creatures/moose/something, but in your file its goosemoose instead of moose. So replace the goosemoose with moose and it should work. I tried it with this in the command line and heard the sound: ThePlayer.SoundEmitter:PlaySound("dontstarve_DLC001/creatures/moose/distant") Edited September 9, 2021 by Monti18 1 Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1492733 Share on other sites More sharing options...
JaccK1618 Posted September 9, 2021 Author Share Posted September 9, 2021 12 hours ago, Monti18 said: The problem is that the sound path is not correct. If you look at the code, you see that the path is always dontstarve_DLC001/creatures/moose/something, but in your file its goosemoose instead of moose. So replace the goosemoose with moose and it should work. I tried it with this in the command line and heard the sound: ThePlayer.SoundEmitter:PlaySound("dontstarve_DLC001/creatures/moose/distant") Is there anything else wrong or just changing that work? Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1493127 Share on other sites More sharing options...
Monti18 Posted September 9, 2021 Share Posted September 9, 2021 I think it should be just this, the rest looks good! 1 Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1493128 Share on other sites More sharing options...
JaccK1618 Posted September 9, 2021 Author Share Posted September 9, 2021 Just now, Monti18 said: I think it should be just this, the rest looks good! Ok thanks. Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1493130 Share on other sites More sharing options...
JaccK1618 Posted September 10, 2021 Author Share Posted September 10, 2021 5 hours ago, Monti18 said: I think it should be just this, the rest looks good! Ok it still doesn't work here's the new Dropbox. Make sure to check everything because we really have no idea what we're doing. https://www.dropbox.com/sh/gs2bl7mzu2tkl6h/AADVj-Eke6Mt7OifN926ypa4a?dl=0 Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1493289 Share on other sites More sharing options...
Monti18 Posted September 10, 2021 Share Posted September 10, 2021 I you spawn the prefab with c_spawn"goosewarning_lvl4" directly beneath you, you will hear the sound. I'm not sure why you don't hear it otherwise, but this would take quite some time to find out and I don't really have the time for that. Add some prints in the goosespawner component in DoWarningSound and OnUpdate to check if the warning sound is played and where it gets stuck. 1 Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1493385 Share on other sites More sharing options...
JaccK1618 Posted September 10, 2021 Author Share Posted September 10, 2021 13 hours ago, Monti18 said: I you spawn the prefab with c_spawn"goosewarning_lvl4" directly beneath you, you will hear the sound. I'm not sure why you don't hear it otherwise, but this would take quite some time to find out and I don't really have the time for that. Add some prints in the goosespawner component in DoWarningSound and OnUpdate to check if the warning sound is played and where it gets stuck. So like, function self:DoWarningSound(_targetplayer) --Players near _targetplayer will hear the warning sound from the --same direction and volume offset from their own local positions --Moose/Goose doesn't actually have a warning sound. It will just show up uninvited. SpawnPrefab("goosewarning_lvl".. (((_timetoattack == nil or _timetoattack < 30) and "4") or (_timetoattack < 60 and "3") or (_timetoattack < 90 and "2") or "1") ).Transform:SetPosition(_targetplayer.Transform:GetWorldPosition()) c_spawn"goosewarning_lvl4" end that? Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1493637 Share on other sites More sharing options...
Monti18 Posted September 10, 2021 Share Posted September 10, 2021 No I meant using the console of the game. If you press ' it opens the console and there you can enter it and hear the sound. function self:DoWarningSound(_targetplayer) print("now playing warning sound") print(_targetplayer) --Players near _targetplayer will hear the warning sound from the --same direction and volume offset from their own local positions --Moose/Goose doesn't actually have a warning sound. It will just show up uninvited. SpawnPrefab("goosewarning_lvl".. (((_timetoattack == nil or _timetoattack < 30) and "4") or (_timetoattack < 60 and "3") or (_timetoattack < 90 and "2") or "1") ).Transform:SetPosition(_targetplayer.Transform:GetWorldPosition()) end Using prints is something like this, there you can see if it happens or not in the server logs and also the arguments that are passed. Then you can see where the function is not working, which means where the prints are stopping if you are doing it all the way with the onupdate function. 1 Link to comment https://forums.kleientertainment.com/forums/topic/133374-moose-goose-warning-sound/#findComment-1493661 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