[solved] SOA random int
Hello, I'm having difficulty creating a variable "SOA" that will be used to determine how long a sketchpad display will appear. I want it to randomly last either 400, 500, or 600 ms. I'm having difficulty translating what I want in English to the "Open sesame/ Python" language.
So far I have this as an inline script.
import random
Category_SOA = random.randint(0, 2)
SOA = 0
if Category_SOA == 0:
SOA = 1000
elif Category_SOA == 1:
SOA = 2000
else:
SOA = 3000
exp.set("SOA", SOA)
When I run it, it says there is no variable called "SOA"
Comments
Never mind, as usual it was a simple fix. I put the code in the "Run" instead of "Prepare" Section.