Color of Randomized Pairs of Words


Author
Message
Westphal00
Westphal00
New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)New Member (5 reputation)
Group: Forum Members
Posts: 1, Visits: 19
Hi there!

I am in the process of designing an experiment that shows pairs of words using different colors. The pairs should be the same two words each time, regardless of which list. One list (FishCON/AnimalCON) randomly selects between three colors for the two words that it picks. The other list (FishUNC/AnimalUNC) is supposed to have three pairs of words, with their own respective color, and have a random order. (Cat/whale = Red; Dog/Turtle = Orange;  Rabbit/tortoise = purple) So every time, Cat/Whale should be Red, Dog/Turtle should be Orange, and Rabbit/Tortoise should be purple, but the order on when these pairs appear should be random.

Essentially, all six combined pairs should be randomized each time an experiment is run. I am having trouble with the latter list (FishUNC/AnimalUNC) and coding to where it automatically picks Red for Cat/Whale, etc. each time. Any help would be so greatly appreciated!

I have copied below the relevant text

<block 2>
/ trials = random[1-6= 1, 2]
</block>

<trial 1>
/ stimulustimes = [0=FishCON; 1000 = clearscreen; 1250= AnimalCON; 2250 = clearscreen]
/ ontrialbegin = [text.AnimalCON.textcolor=list.Color.nextvalue;
text.FishCON.textcolor=list.Color2.nextvalue]
/ response = anyresponse
</trial>

<text FishCON>
/ items = ("Shark", "Pufferfish", "Fish")
/ select = noreplace
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<text AnimalCON>
/ items = ("Lion", "Tiger", "Panther")
/ select = text.FishCON.currentindex
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<list Color>
/items = (yellow, blue, green)
/ selectionmode = random
</list>

<list Color2>
/items = (yellow, blue, green)
/ selectionmode = random
</list>

<trial 2>
/ stimulustimes = [0 = text.FishUNC; 1000 = clearscreen; 1250 = text.AnimalUNC; 2250 = clearscreen;]
/ response = anyresponse
</trial>

<text FishUNC>
/ items = ("Whale", "Turtle", "Tortoise")
/ select = noreplace
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<text AnimalUNC>
/ items = ("Cat", "Dog", "Rabbit")
/ select = text.FishUNC.currentindex
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>
Dave
Dave
Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)Supreme Being (830K reputation)
Group: Administrators
Posts: 10K, Visits: 58K
Westphal00 - 7/5/2020
Hi there!

I am in the process of designing an experiment that shows pairs of words using different colors. The pairs should be the same two words each time, regardless of which list. One list (FishCON/AnimalCON) randomly selects between three colors for the two words that it picks. The other list (FishUNC/AnimalUNC) is supposed to have three pairs of words, with their own respective color, and have a random order. (Cat/whale = Red; Dog/Turtle = Orange;  Rabbit/tortoise = purple) So every time, Cat/Whale should be Red, Dog/Turtle should be Orange, and Rabbit/Tortoise should be purple, but the order on when these pairs appear should be random.

Essentially, all six combined pairs should be randomized each time an experiment is run. I am having trouble with the latter list (FishUNC/AnimalUNC) and coding to where it automatically picks Red for Cat/Whale, etc. each time. Any help would be so greatly appreciated!

I have copied below the relevant text

<block 2>
/ trials = random[1-6= 1, 2]
</block>

<trial 1>
/ stimulustimes = [0=FishCON; 1000 = clearscreen; 1250= AnimalCON; 2250 = clearscreen]
/ ontrialbegin = [text.AnimalCON.textcolor=list.Color.nextvalue;
text.FishCON.textcolor=list.Color2.nextvalue]
/ response = anyresponse
</trial>

<text FishCON>
/ items = ("Shark", "Pufferfish", "Fish")
/ select = noreplace
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<text AnimalCON>
/ items = ("Lion", "Tiger", "Panther")
/ select = text.FishCON.currentindex
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<list Color>
/items = (yellow, blue, green)
/ selectionmode = random
</list>

<list Color2>
/items = (yellow, blue, green)
/ selectionmode = random
</list>

<trial 2>
/ stimulustimes = [0 = text.FishUNC; 1000 = clearscreen; 1250 = text.AnimalUNC; 2250 = clearscreen;]
/ response = anyresponse
</trial>

<text FishUNC>
/ items = ("Whale", "Turtle", "Tortoise")
/ select = noreplace
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<text AnimalUNC>
/ items = ("Cat", "Dog", "Rabbit")
/ select = text.FishUNC.currentindex
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

You need to pair a <list> holding the colors assigned to the pairs to the selection of the respective <text> element:

<block example>
/ trials = [1-6 = 2]
</block>

<trial 2>
/ ontrialbegin = [
    text.FishUNC.textcolor = list.paircolor.nextvalue;
    text.AnimalUNC.textcolor = list.paircolor.currentvalue;

]
/ stimulustimes = [0 = text.FishUNC; 1000 = clearscreen; 1250 = text.AnimalUNC; 2250 = clearscreen;]
/ response = anyresponse
</trial>

<text FishUNC>
/ items = ("Whale", "Turtle", "Tortoise")
/ select = noreplace
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<text AnimalUNC>
/ items = ("Cat", "Dog", "Rabbit")
/ select = text.FishUNC.currentindex
/fontstyle = ("Arial", 10.00%, false, false, false, false, 5, 1)
/ size = (75%, 20%)
</text>

<list paircolor>
/ items = (red, orange, purple)
/ selectionmode = text.FishUNC.nextindex
</list>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search