Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

randomizing location

  1. #1

    randomizing location

    Is there any way to use the rand() command to randomize location? I'm doing a parafoveal priming task and I want the prime lacation (one of four quadrants) to be random.

  2. #2
    jarvis24 Blair Jarvis, Administrator
    Haven't tried. I expect you would run into trouble with the commas if you tried the whole thing at once like this:
    rand(.25,.25,0,.25,.75,0,.75,.25.0,.75,.75,0)

    You might think this would work:
    (".25,.25,0",".25,.75,0",".75,.25.0",".75,.75,0")

    But it won't--the parser I wrote doesn't care about quotes.

    There may be a way though. Try this:
    rand(.25,.75),rand(.25,.75),0

    That ought to give you a randomly chosen quadrent. Remember to use center alignment in your style if you want the stimuli to be centered on these points.

    For interested others: see Using Random Values in the guide for more detail on this function.

    Hope that helps!
    Blair