Forum rules - please read before posting.

Enable/Disable the Player's sound child

Hi Chris,

I would like to disable or mute the sound child of Player by action and after few seconds enable again.
When switching scene, I turn on the light attached on Player by light switch, but a footstep sound is played strangely. I would like to make the player silent a few seconds after the scene is switched. How would I do it? Any suggestion? Thanks a lot.

Comments

  • Is this an issue with the Footstep Sounds component you're trying to get around?

    You can set the "Relative volume" of a Sound component using the Sound: Change volume Action. You can use this to set the relative volume to 0, wait a few seconds, and set it back to 1 / it's original value.

  • Hi Chris,

    Thanks for your suggestion. It works for NPC sound child in the scene.
    However, I do not put the player prefab in the scenes (AC suggests do not put Player prefab in the scenes), I can't drag the player prefab sound child to the action field.
    I would like to mute my Player prefab by action, any suggestions? Thanks a lot.
  • You can have a Player present in the scene file - auto-spawning it from the Settings Manager is just a convenience.

    To do the same thing to a prefab, though, make sure the ActionList is an asset file. Then drop the Player into the scene, assign the scene-instance of the Sound child to the Action field, and then check Retain in prefab? on the Constant ID component that then gets created. Applying the change to the prefab, and removing from the scene, should then cause it to work.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.