How to make script to play multiple samples at certain percentage

quietline
quietline Member Posts: 6 Member
edited February 2022 in Scripting Workshop

How can I use a script to allow multiple samples to be played from different groups, while allowing the user to determine the percentage, or gain, of each sample being played? 

So, for example, a knob will expose values between 0 and 100 and allow the user to select a value. This value will be used to determine the amount of each sample played from Group1 and Group3 and Group5 as the necessary samples from those three groups will be played simultaneously.

I'm just not sure at all how to pull this off though.

Best Answer

  • EvilDragon
    EvilDragon Moderator Posts: 1,017 mod
    edited February 2022 Answer ✓

    Moving this to scripting subforum.


    You need to adjust the volume of each group, and to do that, you need to use set_engine_par() command along with $ENGINE_PAR_VOLUME. See KSP reference for more info.

Answers

  • EvilDragon
    EvilDragon Moderator Posts: 1,017 mod
    edited February 2022 Answer ✓

    Moving this to scripting subforum.


    You need to adjust the volume of each group, and to do that, you need to use set_engine_par() command along with $ENGINE_PAR_VOLUME. See KSP reference for more info.

Back To Top