Millisecond Forums

Creating 'variables' in Inquisit and using them to determine the position of a shape

https://forums.millisecond.com/Topic23124.aspx

By Nick Riches - 12/18/2017

Hi

I'm trying to get a shape to appear in different positions on different trials. The position would ideally be an item stored in an item or list element. However, Inquisit only seems to allow you to store string values in item or list elements. Is there any way to store the position, and then plug it into the shape element?
Below is ta minimal worked example.

Thanks


<list shapeVposn>
/ items = (25%, 50%, 50%, 25%)
</list>

<list shape>
/ items = (rectangle, circle, rectangle, circle)
</list>


<shape shape>
/ shape = list.shape
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn)
</shape>

<trial shapeTrial>
/ stimulusframes = [1 = shape]
/ validresponse = (" ")
</trial>

<block block>
/ trials = [1 = shapeTrial]
</block>

By Dave - 12/19/2017

Nick Riches - Tuesday, December 19, 2017
Hi

I'm trying to get a shape to appear in different positions on different trials. The position would ideally be an item stored in an item or list element. However, Inquisit only seems to allow you to store string values in item or list elements. Is there any way to store the position, and then plug it into the shape element?
Below is ta minimal worked example.

Thanks


<list shapeVposn>
/ items = (25%, 50%, 50%, 25%)
</list>

<list shape>
/ items = (rectangle, circle, rectangle, circle)
</list>


<shape shape>
/ shape = list.shape
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn)
</shape>

<trial shapeTrial>
/ stimulusframes = [1 = shape]
/ validresponse = (" ")
</trial>

<block block>
/ trials = [1 = shapeTrial]
</block>


As for the position, yes, but your syntax is wrong. It needs to read:

<shape shape>
/ shape = rectangle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

However,  this

<list shape>
/ items = (rectangle, circle, rectangle, circle)
</list>

<shape shape>
/ shape = list.shape
/ color = darkblue
...
</shape>

will not work. You cannot change a <shape> element's shape at runtime. You need separate <shape> elements -- one rectangular, one circular -- and then select one of the two to display.

<list shapeVposn>
/ items = (25%, 50%, 50%, 25%)
</list>

<list shape>
/ items = (shape.shape_rect, shape.shape_circ, shape.shape_rect, shape.shape_circ)
</list>

<shape shape_rect>
/ shape = rectangle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

<shape shape_circ>
/ shape = circle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

<trial shapeTrial>
/ stimulusframes = [1 = list.shape]
/ validresponse = (" ")
</trial>

<block block>
/ trials = [1-4 = shapeTrial]
</block>
By Nick Riches - 12/19/2017

Dave - Tuesday, December 19, 2017
Nick Riches - Tuesday, December 19, 2017
Hi

I'm trying to get a shape to appear in different positions on different trials. The position would ideally be an item stored in an item or list element. However, Inquisit only seems to allow you to store string values in item or list elements. Is there any way to store the position, and then plug it into the shape element?
Below is ta minimal worked example.

Thanks


<list shapeVposn>
/ items = (25%, 50%, 50%, 25%)
</list>

<list shape>
/ items = (rectangle, circle, rectangle, circle)
</list>


<shape shape>
/ shape = list.shape
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn)
</shape>

<trial shapeTrial>
/ stimulusframes = [1 = shape]
/ validresponse = (" ")
</trial>

<block block>
/ trials = [1 = shapeTrial]
</block>


As for the position, yes, but your syntax is wrong. It needs to read:

<shape shape>
/ shape = rectangle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

However,  this

<list shape>
/ items = (rectangle, circle, rectangle, circle)
</list>

<shape shape>
/ shape = list.shape
/ color = darkblue
...
</shape>

will not work. You cannot change a <shape> element's shape at runtime. You need separate <shape> elements -- one rectangular, one circular -- and then select one of the two to display.

<list shapeVposn>
/ items = (25%, 50%, 50%, 25%)
</list>

<list shape>
/ items = (shape.shape_rect, shape.shape_circ, shape.shape_rect, shape.shape_circ)
</list>

<shape shape_rect>
/ shape = rectangle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

<shape shape_circ>
/ shape = circle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

<trial shapeTrial>
/ stimulusframes = [1 = list.shape]
/ validresponse = (" ")
</trial>

<block block>
/ trials = [1-4 = shapeTrial]
</block>


By Nick Riches - 12/19/2017

Nick Riches - Wednesday, December 20, 2017
Dave - Tuesday, December 19, 2017
Nick Riches - Tuesday, December 19, 2017
Hi

I'm trying to get a shape to appear in different positions on different trials. The position would ideally be an item stored in an item or list element. However, Inquisit only seems to allow you to store string values in item or list elements. Is there any way to store the position, and then plug it into the shape element?
Below is ta minimal worked example.

Thanks


<list shapeVposn>
/ items = (25%, 50%, 50%, 25%)
</list>

<list shape>
/ items = (rectangle, circle, rectangle, circle)
</list>


<shape shape>
/ shape = list.shape
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn)
</shape>

<trial shapeTrial>
/ stimulusframes = [1 = shape]
/ validresponse = (" ")
</trial>

<block block>
/ trials = [1 = shapeTrial]
</block>


As for the position, yes, but your syntax is wrong. It needs to read:

<shape shape>
/ shape = rectangle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

However,  this

<list shape>
/ items = (rectangle, circle, rectangle, circle)
</list>

<shape shape>
/ shape = list.shape
/ color = darkblue
...
</shape>

will not work. You cannot change a <shape> element's shape at runtime. You need separate <shape> elements -- one rectangular, one circular -- and then select one of the two to display.

<list shapeVposn>
/ items = (25%, 50%, 50%, 25%)
</list>

<list shape>
/ items = (shape.shape_rect, shape.shape_circ, shape.shape_rect, shape.shape_circ)
</list>

<shape shape_rect>
/ shape = rectangle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

<shape shape_circ>
/ shape = circle
/ color = darkblue
/ height = 10%
/ width = 10%
/ position = (50%, list.shapeVposn.nextvalue)
</shape>

<trial shapeTrial>
/ stimulusframes = [1 = list.shape]
/ validresponse = (" ")
</trial>

<block block>
/ trials = [1-4 = shapeTrial]
</block>



Many thanks for that. The script works perfectly. I'm beginning to see the differences between items and lists.

Nick