de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Timed multiple buttons?
PostPosted: Wed Oct 07, 2015 4:10 pm 
Offline
Veteran
Hello everybody.

I was wondering if there is a way to use the timed function on buttons (e.g. showButton("Continue", 10)), while several buttons are shown. Imagine a multiple choice quiz with four options, where you get it wrong if you answer one of the three or simply does not make it in time.

A second question: Is it possible to show a timer and a button on the same time? Like a countdown?

Best regards,
cd228


Top
 Profile Send private message 
 
 Re: Timed multiple buttons?
PostPosted: Wed Oct 07, 2015 5:05 pm 
Offline
Site Admin
User avatar
There are no functions like this.

For the 2nd problem, you can show a button durung 1 second, in a loop.

See also : http://ss.deviatenow.com/viewtopic.php?f=4&t=438


Top
 Profile Send private message 
 
 Re: Timed multiple buttons?
PostPosted: Wed Oct 07, 2015 5:09 pm 
Offline
Veteran
Damn...:/
Nevertheless thank you for the answer:)


Top
 Profile Send private message 
 
 Re: Timed multiple buttons?
PostPosted: Wed Oct 07, 2015 5:13 pm 
Offline
Site Admin
User avatar
You're welcome. Notice, for a quizz, you can choose a different aproach : getSelectedValue() then calculate the elapsed time to say ok, wrong or too late.


Top
 Profile Send private message 
 
 Re: Timed multiple buttons?
PostPosted: Wed Oct 07, 2015 6:28 pm 
Offline
Veteran
Ahh good idea. Not completely what I was looking for, but it will do:)


Top
 Profile Send private message 
 
 Re: Timed multiple buttons?
PostPosted: Fri Oct 09, 2015 8:26 am 
Offline
Veteran
User avatar
cd228, I wanted to do this at one point too, and was also sad it wasn't possible. Still, a Doti says, a good workaround is to tell the player they have x seconds to "answer" and use the method he suggests ("You took too long!"). It's not as ideal, but it should work fine.

Also, in theory, you could display a "countdown", I'm guessing (look at mine and other scripts that display a series of spanks (x) that count onscreen: 1... 2... 3... etc.); I think you could do something similar with a timed countdown loop (no actual spanks/sounds), so the player will see 10... 9... 8... 7... 0" until they click a button. Just an idea, though; not sure if it would work in reality.

Something I personally want is a "buttonwithgauge" function that shows the timer gauge before you click a button. :)


Top
 Profile Send private message 
 
 Re: Timed multiple buttons?
PostPosted: Fri Oct 09, 2015 2:22 pm 
Offline
Veteran
Well I have been doing the following for single button:

In script:

Code:
def si = new groovy.lang.GroovyClassLoader(); si.addClasspath("scripts/Denial/");
def ss = si.loadClass("Functions");


if(!ss.countDown(this, "Hurry up and get naked.", "Naked", 30)){
      show("Don't keep me waiting like that, bitch!\nGive your balls 10 slaps");
   }


In Function.groovy
Code:
def static countDown(main, message, button, time){   
      boolean stop = false;
      boolean onTime = false;
      def timedButton;
      while(!stop && time>0){
         main.show(time + "\n\n\n" + message);
         timedButton = main.showButton(button, 1);
         if(timedButton!=1){
            stop = true;
            onTime = true;
         }
         time--;
         
      }
      return onTime;
   }


This all works fine, and shows a countdown, where you will have returned "false" to the script if the timer has run out, and "true" if you reported in time.

Now I just need to see if I can find a workaround with several buttons...
You cannot time getSelectedValue(), can you?


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.