Make a "press and hold button to..." input
I have a working volume control using d-pad up/down to a counter, then to the slider for the channel I am controlling. The volume is set to increment between 0 and 100.
unfortunately this makes the user press the corresponding d-pad button several times to get to the desired volume, so if they want to raise the volume 20 increments, they press the d-pad up button 20 times.
I have seen multiple players that have it setup so you just hold d-pad up to continuously raise the volume until it reaches max or the button is released.
I have looked at how a couple of people have made this happen, but some are way more advanced than I am capable of understanding so far... using keyframes that seemingly aren't controlled by anything and logic that has no wires connecting gadgets together... I am just not that advanced in Dreams yet.
I have tried signal manipulators, switches, and even attempted to mimic the keyframe version I was able to look into, but I am just not making it happen, or am missing something still.
How can I make a volume control system that allows users to simply hold the d-pad buttons to raise/lower the volume without having to press the button so many times (preferably without animation, if possible)?
-
Add a timer, set it to "speed" mode. Now wire a signal into the "play timer" input. It will use whatever you send through there as the speed of the timer. So 1 = 100% = 1 second passes for 1 second of real time. And 0 = 0% = 0 seconds pas for 1 second of real time.
So while the player is holding up, send it 1 (or just wire straight in). And while the player is holding down, send it -1. (Or whatever speeds you want to use.)
The timer has a "timer output" that is the percentage through the timer it currently is. So you can use that, or use the "current time." -
'@TAPgiles Thank you. This almost works as written, but the timer cant send a negative number signal. However, applying a timer to the d-pad down worked the same as to the up when sending the outputs to a counter (I sent 0.1 for both signals as anything larger was too slow).
I would only add, for those who use this solution, to remember to send the “counter finished” signal back into the “counter reset” signal to be sure the signal is sent more than once.
Iniciar sesión para dejar un comentario.