Diagonal movement


Diagonal movement

Author
Message
serge
serge
Associate Member
Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)

Group: Forum Members
Posts: 5, Visits: 9
Hi, everyone. Is there a straightforward way in Inquisit 5 to display a word in the center of the screen and, with a keypress, move it diagonally - that is, toward the lower-left corner with one keypress, lower-right corner with another keypress, and similarly upper-left and upper-right?

serge
serge
Associate Member
Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)

Group: Forum Members
Posts: 5, Visits: 9
serge - Monday, March 19, 2018
Hi, everyone. Is there a straightforward way in Inquisit 5 to display a word in the center of the screen and, with a keypress, move it diagonally - that is, toward the lower-left corner with one keypress, lower-right corner with another keypress, and similarly upper-left and upper-right?

To add - ideally, I'd like to be able to set how quickly the motion happens. For instance, it would take 2 seconds for the word to move into a particular corner. Thank you!

Dave
Dave
Supreme Being
Supreme Being (447K reputation)Supreme Being (447K reputation)Supreme Being (447K reputation)Supreme Being (447K reputation)Supreme Being (447K reputation)Supreme Being (447K reputation)Supreme Being (447K reputation)Supreme Being (447K reputation)Supreme Being (447K reputation)

Group: Administrators
Posts: 9K, Visits: 38K
serge - Monday, March 19, 2018
serge - Monday, March 19, 2018
Hi, everyone. Is there a straightforward way in Inquisit 5 to display a word in the center of the screen and, with a keypress, move it diagonally - that is, toward the lower-left corner with one keypress, lower-right corner with another keypress, and similarly upper-left and upper-right?

To add - ideally, I'd like to be able to set how quickly the motion happens. For instance, it would take 2 seconds for the word to move into a particular corner. Thank you!

This should be possible using the /animation attribute of the respective <text> elements. Something like this should work, I think.

<text stimulus>
/ items = myitems
</text>

<item myitems>
/ 1 = "A"
/ 1 = "B"
/ 1 = "C"
/ 1 = "D"
</item>

<text stim_to_lower_left>
/ items = myitems
/ select = text.stimulus.currentindex
/ animation = path(2000, -1, 50%, 50%, 10%, 90%)
</text>

<text stim_to_lower_right>
/ items = myitems
/ select = text.stimulus.currentindex
/ animation = path(2000, -1, 50%, 50%, 90%, 90%)
</text>

// press e to move to lower left
// press i to move to lower right
<trial mytrial>
/ stimulusframes = [1=stimulus]
/ validresponse = (18,23)
/ branch = [
    if (trial.mytrial.response==18) trial.to_lower_left else trial.to_lower_right
]
</trial>

<trial to_lower_left>
/ stimulusframes = [1=clearscreen, stim_to_lower_left]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial to_lower_right>
/ stimulusframes = [1=clearscreen, stim_to_lower_right]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<block myblock>
/ trials = [1-4 = mytrial]
</block>


serge
serge
Associate Member
Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)Associate Member (74 reputation)

Group: Forum Members
Posts: 5, Visits: 9
Dave - Monday, March 19, 2018
serge - Monday, March 19, 2018
serge - Monday, March 19, 2018
Hi, everyone. Is there a straightforward way in Inquisit 5 to display a word in the center of the screen and, with a keypress, move it diagonally - that is, toward the lower-left corner with one keypress, lower-right corner with another keypress, and similarly upper-left and upper-right?

To add - ideally, I'd like to be able to set how quickly the motion happens. For instance, it would take 2 seconds for the word to move into a particular corner. Thank you!

This should be possible using the /animation attribute of the respective <text> elements. Something like this should work, I think.

<text stimulus>
/ items = myitems
</text>

<item myitems>
/ 1 = "A"
/ 1 = "B"
/ 1 = "C"
/ 1 = "D"
</item>

<text stim_to_lower_left>
/ items = myitems
/ select = text.stimulus.currentindex
/ animation = path(2000, -1, 50%, 50%, 10%, 90%)
</text>

<text stim_to_lower_right>
/ items = myitems
/ select = text.stimulus.currentindex
/ animation = path(2000, -1, 50%, 50%, 90%, 90%)
</text>

// press e to move to lower left
// press i to move to lower right
<trial mytrial>
/ stimulusframes = [1=stimulus]
/ validresponse = (18,23)
/ branch = [
    if (trial.mytrial.response==18) trial.to_lower_left else trial.to_lower_right
]
</trial>

<trial to_lower_left>
/ stimulusframes = [1=clearscreen, stim_to_lower_left]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<trial to_lower_right>
/ stimulusframes = [1=clearscreen, stim_to_lower_right]
/ validresponse = (0)
/ trialduration = 2000
</trial>

<block myblock>
/ trials = [1-4 = mytrial]
</block>


Thanks, David. This code should start me off heading in the right direction.

GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search