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


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Quick tricks
PostPosted: Sat Jan 26, 2013 2:57 pm 
Offline
Shy
Hi all,

Firstly, wonderful program! I spent a few weeks relying on the ssScriptMaker program and had some fun there, but then I tried some actual groovy script. Wow. It's awesome, isn't it?

With that in mind, I'd like to show you a neat closure I've come up with to make my life a little easier. See what you think:

Code:
def showFor = {
   showUntil, showText ->
   show(showText)
   if (showUntil.toString().isInteger()) {
      this.wait(showUntil.toInteger())
   } else {
      showButton(showUntil)
   }
}
showFor("Yes, Master","Are you ready to begin?")  // Shows the question and waits for the "Yes, Master" button to be clicked
showFor(60, "Stand in the corner for 1 minute")  // Shows the text for 60 secs

I find it saves me a bit of time and a lot of space, particularly with the kinds of scripts that I write (mostly image slideshows with bossing about, humiliation and general mockery)

So, have you guys got any other quick tricks like this to share?

LMW


Top
 Profile Send private message 
 
 Re: Quick tricks
PostPosted: Wed Jul 31, 2013 11:35 am 
Offline
Newcomer
About the font, there is a script to globally change the font, could this also include the size? If i write my script i don't want to force my taste for larger fonts on anyone else, so i would prefer it to be an option for the user.

_________________
riya


Top
 Profile Send private message 
 
 Re: Quick tricks
PostPosted: Wed Jul 31, 2013 7:55 pm 
Offline
Site Admin
User avatar
Sorry, the size of the font follows a complex algorithm, setting a default size is not really possible ; script should hardly ever set the size of text.


Top
 Profile Send private message 
 
 Re: Quick tricks
PostPosted: Sat Nov 30, 2013 11:18 am 
Offline
Regular
Neat trick! Here's one that I make use of

Code:
def percentChance = { percent ->
   switch(getRandom(100)){
      case 0..percent:
         return true
      default:
         return false
      }
}



Code:
if(percentChance(75))
return 1
else
return 0


75% chance to return true, 25% chance to return false

I find it reads a nicely on more complex conditionals.


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 6 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.