Combining shapes into one object


Author
Message
piotr_styrkowiec
piotr_styrkowiec
Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)
Group: Forum Members
Posts: 39, Visits: 183
Thank you for your help.
Will try to do what you suggest.
Piotr


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: 13K, Visits: 104K
What you can do is insert the stimuli in question into the trial's frames once at the beginning of the <expt> or <block>:

<block myblock>
/ onblockbegin = [trial.mytrial.setstimulustime(shape.h,0); trial.mytrial.insertstimulustime(shape.v,0)]
/ trials = [1-4=mytrial]
</block>

<trial mytrial>
/ stimulustimes = [500=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("A", "B", "C", "D")
</text>

<shape h>
/ shape = rectangle
/ size = (50%, 2px)
</shape>

<shape v>
/ shape = rectangle
/ size = (2px, 50%)
</shape>

They will persist as long as you don't call resetstimulusframes().

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: 13K, Visits: 104K
No, you cannot combine <shape>s (or other stimuli) into a single object. <list> elements wouldn't help here either. Every object you want to have displayed by a <trial> must be in its /stimulustimes or -frames.

To make a <list> of shape elements, you do

<list shapelist>
/ items = (shape.a, shape.b, shape.c, ...)
...
</list>

<shape a>
...
</shape>
...
<shape c>
...
</shape>
...

as you would for any other stimulus element

piotr_styrkowiec
piotr_styrkowiec
Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)
Group: Forum Members
Posts: 39, Visits: 183
How to combine many shapes in one object without listing them all in the trial stimulustimes attribute?This is I have 6 lines (thin rectangles; 3 vertical, 3 horizontal) and these lines create a grid when put together.So in every trial when I want this grid to be presented on the screen I need to write something like this:
/ stimulustimes = [1=line_1, line_2, line_3, line_4 line_5, line_6; 500=......]
Is there a possibility to combine these lines into one object 'grid' so I can put in every trial just this one element?
like this:
/ stimulustimes = [1= grid; 500=.....]

And something perhaps related: how to create list of shapes?
Will be very grateful for help.
Piotr
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search