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


Author
Message
Nick Riches
Nick Riches
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 19, Visits: 69
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>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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>

Nick Riches
Nick Riches
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 19, Visits: 69
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>



Nick Riches
Nick Riches
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 19, Visits: 69
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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search