Congratulations Rich, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Easy Random Responses?

Assistance Requested

Help Doombot with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

Doombot claims to have checked these sources:

Is there a simple way of having random responses to a single voice command?

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.

Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


Kind of...

I use a script which has a list of pre-defined responses set up and uses a random number to pick one of the responses.


# Get a response value
$response = GetRandom(0,100)

If($response = 0)
SayWait("This is the first response")
ElseIf($response = 1)
SayWait("This is the second response")
ElseIf($response = 2)
# You get the idea


GetRandom( Min, Max )
Returns a random number between Min and Max
Example: $x = GetRandom(10, 50)


There you go! I knew it was gonna be GetRandom, I just didn't know how to apply it.
All hail the sultan of script Smile


Resolving Smile