Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 5
»
Conditional Color
Conditional Color
Post Reply
Like
35
Conditional Color
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
aquirk
aquirk
posted 8 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 31,
Visits: 70
I want to update the pursuit rotor task script (where a circle rotates around the screen, and participants have to keep their mouse on the circle) so that the color of the rotating circle changes dependent on whether the mouse is touching it or not. I think the code should look something like:
if (values.current_targetlocation = 0) {
shape.animatedCircle.color = white
};
else {
shape.animatedCircle.color = blue
}
]
but I can't figure out where to put this. Is there a way to put if/else statements in the color attribute? Or an attribute within the trial section I could use? /ontrialbegin doesn't seem to work.
Reply
Like
35
Dave
Dave
posted 8 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 105K
+
x
aquirk - Wednesday, April 26, 2017
I want to update the pursuit rotor task script (where a circle rotates around the screen, and participants have to keep their mouse on the circle) so that the color of the rotating circle changes dependent on whether the mouse is touching it or not. I think the code should look something like:
if (values.current_targetlocation = 0) {
shape.animatedCircle.color = white
};
else {
shape.animatedCircle.color = blue
}
]
but I can't figure out where to put this. Is there a way to put if/else statements in the color attribute? Or an attribute within the trial section I could use? /ontrialbegin doesn't seem to work.
If you wish to use the Inquisit 5-version of the script, it's not technically possible to alter the color mid-trial during <trial rotate> based on whether the mouse is on- or off-target.
However, you can use the Inquisit 4-version, which is implemented differently due to the lack of bespoke animation features:
https://www.millisecond.com/download/library/v4/pursuitrotor/pursuitrotor.iqx
The Inquisit 4 version can (and does!) change the color of the circle depending on whether the cursor is on- or off-target.
Reply
Like
33
aquirk
aquirk
posted 8 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 31,
Visits: 70
+
x
Dave - Wednesday, April 26, 2017
+
x
aquirk - Wednesday, April 26, 2017
I want to update the pursuit rotor task script (where a circle rotates around the screen, and participants have to keep their mouse on the circle) so that the color of the rotating circle changes dependent on whether the mouse is touching it or not. I think the code should look something like:
if (values.current_targetlocation = 0) {
shape.animatedCircle.color = white
};
else {
shape.animatedCircle.color = blue
}
]
but I can't figure out where to put this. Is there a way to put if/else statements in the color attribute? Or an attribute within the trial section I could use? /ontrialbegin doesn't seem to work.
If you wish to use the Inquisit 5-version of the script, it's not technically possible to alter the color mid-trial during <trial rotate> based on whether the mouse is on- or off-target.
However, you can use the Inquisit 4-version, which is implemented differently due to the lack of bespoke animation features:
https://www.millisecond.com/download/library/v4/pursuitrotor/pursuitrotor.iqx
The Inquisit 4 version can (and does!) change the color of the circle depending on whether the cursor is on- or off-target.
Thank you!
Reply
Like
33
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
35
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search