MPU6050 Accelerometer Gyro Temperature icon MPU6050 Accelerometer Gyro Temperature Reads MPU6050 gyro, accelerometer and temperature via I2C, initializes and returns data on-demand to EZ-Script variables using ControlCommand RunOnce Try it →

ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#1  

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
EndIf

Quote:

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

#2  

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:)