Toggle Voice Acting?

  • #1, z ygmantellTuesday, 25. July 2017, 17:30 hodinky 7 years ago
    Is there a way to toggle the voice acting on and off in game?
    Like in a menu, or (for easy development) assigned to a Key Action?
    I assume this would be done with a simple script, but I'm inept when it comes to scripting smile

    Thanks so much!

    Čestný člen

    274 Posts


  • #2, z afrlmeTuesday, 25. July 2017, 18:06 hodinky 7 years ago
    Have you looked through the action parts? There's one that let's you set text only, voice only or both text & voice.

    Just rig up a value or condition & create an if query... something along the lines of...

    if condition "voice_enabled" is true
     set text and voice output: only text output
     change condition "voice_enabled" to false
    else
     set text and voice output: text and speech output
     change condition "voice_enabled" to true
    end if


    Though alternatively you can use Lua script if you prefer.

    Imperátor

    7285 Posts

  • #3, z ygmantellTuesday, 25. July 2017, 18:25 hodinky 7 years ago
    Haha, wow, okay, I did not see that... sorry!

    But when I set it up like you said, it still doesnt work

    I also added an action at game start to change it to text only, and change the condition to false, so when the player presses V it will toggle the voices.

    But when I play the game, I still hear the voices (in game, of course razz ) and the V key isn't doing anything.

    Any ideas?

    Thanks!

    EDIT:  Started a new game and it works perfectly... Thanks so much!
    (Sorry I didn't see the action part!)

    Čestný člen

    274 Posts

  • #4, z afrlmeTuesday, 25. July 2017, 19:59 hodinky 7 years ago
    Haha, wow, okay, I did not see that... sorry!

    But when I set it up like you said, it still doesnt work

    I also added an action at game start to change it to text only, and change the condition to false, so when the player presses V it will toggle the voices.

    But when I play the game, I still hear the voices (in game, of course razz ) and the V key isn't doing anything.

    Any ideas?

    Thanks!

    EDIT:  Started a new game and it works perfectly... Thanks so much!
    (Sorry I didn't see the action part!)
    No problem. You could have also used Lua script to sort it out like so too...

    execute a script action part >
    if game.TextOutput == eTextAndSpeechOutput then
     game.TextOutput = eOnlyTextOutput
    else
     game.TextOutput = eTextAndSpeechOutput
    end

    Imperátor

    7285 Posts