How do I remove seconds on a timer?
I want to change the current time when a button is pressed. I currently have a countdown timer from 5 minutes and when a button is pressed I want the timer to remove 10 seconds.
-
Haven't looked into it yet, but i assume the calculator tool could do this.
-
'@ducaty87 Yes I know but I cannot work out how.
-
pass the current time into a subtraction calculator which subtracts 10. Pass the result to the current time. Hook up the power of the calculator to the button you want to use.
-
I cant pass the result to the current time there is no input into the timer
-
Instead of subtracting current time could you calculate a new start time and reset the timer with that?
-
Create a Calculator, a Variable, and two Variable Modifiers.
Set the calculator to calculate 1 divided by 30 (dreams runs logic at 30 frames per second, so we need one thirtieth of a second).
Set the variable's default value to your starting number of seconds.
Set the first modifier to subtract, continuously while powered, and connect the 1/30 calculator to its Value input (not the power input). Hit play and you should see the variable counting down.
Set the second modifier to subtract 5 once when powered on, and connect your button to its power port. -
Hey.?
Place 1x Timer
Place 2x score modifyer
Place 1x score gadget
Place 1x Number displayer
Place 1x counter
Place 1x controller sensor
1. Set the timer of 1s and wire timer finished pulse to reset timer.
2. Wire timer finished pulse into score modifier power. Set operation Type to "add" and operation value to -1.
3. Set the normal score gadget to 300 for a total time of 5mins and wire current score to the number displayer range. Set the display format to "Time".
4. You want use a button for example X. Wire the X button to increase count onto the counter, set target value to 1 and wire the finished pulse to reset counter.
6. Wire also the counter finished pulse into the 2nd score modifier in Power input. Operation type "add" and Operation value to -10.
Now you have a timer which loose continuously -1 and by pressing a button -10. -
If you still having issues, i could look into it. :)
-
'@COB-COmmander. I went with your solution. Only thing you forgot to add to your recipe was the naming of the Score gadget and adding that name to the score modifiers. Otherwise worked great.
-
It was usually my sleep time. But glad that i could help you. :)
-
Is there seriously not an input for current time? Im away from dreams so i cant check
Please sign in to leave a comment.