Hi All,
One other question today, with the Timers, i noticed that there is an Eval switch there, can someone give me one or two examples on how it can be used?
If i for example wanted to ask the user how much time he/she would like to be teased for, I'd like the timer to take that value and start the countdown.
Is this doable at all?
Thanks!
Is there a way to set EOS timer based on a variable/user input
-
cksfantasy
- Explorer

- Posts: 8
- Joined: Fri Oct 25, 2013 12:55 pm
-
Darigaaz
- Explorer

- Posts: 88
- Joined: Wed Oct 07, 2020 11:12 pm
- Gender: Male
- Sexual Orientation: Straight
Re: Is there a way to set EOS timer based on a variable/user input
Prompt: variable = duration_in_s
Eval: duration_in_s = parseInt(duration_in_s)
Timer: eval = 1000 * duration_in_s
The best is to check that the user entered a number and not another string with a if isNan(duration_in_s) after the Eval
Eval: duration_in_s = parseInt(duration_in_s)
Timer: eval = 1000 * duration_in_s
The best is to check that the user entered a number and not another string with a if isNan(duration_in_s) after the Eval
-
cksfantasy
- Explorer

- Posts: 8
- Joined: Fri Oct 25, 2013 12:55 pm
Re: Is there a way to set EOS timer based on a variable/user input
Legend!! Thank you for that, you've made my day and i can confirm that this works well!Darigaaz wrote: Mon Oct 26, 2020 12:37 pm Prompt: variable = duration_in_s
Eval: duration_in_s = parseInt(duration_in_s)
Timer: eval = 1000 * duration_in_s
The best is to check that the user entered a number and not another string with a if isNan(duration_in_s) after the Eval
