Diagonal movement


Author
Message
serge
serge
Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)
Group: Forum Members
Posts: 7, Visits: 13
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
Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)
Group: Forum Members
Posts: 7, Visits: 13
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 (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
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
Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)Partner Member (609 reputation)
Group: Forum Members
Posts: 7, Visits: 13
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

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search