I’m currently piloting an experiment where an element (next_button_11) is only meant to appear after the participant selects a position on a scale (discrim_rating) AND 7 seconds have elapsed. I’ve done this by creating a “show_next11” start condition, which is defined as follows-
Begin Routine:
show_next11 = False
Each Frame:
if show_next11 == False and discrim_rating.markerPos and t > 7.0:
show_next11 = True
This runs perfectly in PsychoPy, waiting the 7 seconds to appear. In Pavlovia, the time condition does NOT work, but the .markerPos one does. What am I doing wrong here?
This is the js script that it auto-creates, in case that helps:
if ((((show_next11 === false) && discrim_rating.markerPos) && (t > 7))) {
show_next11 = true;
}
Any thoughts? I’m still unsure of why t > 7 condition doesn’t work in Pavlovia.
How exactly is it not working? Does it show the button as soon as the marker position has a value? Or does it just not show up at all?
At a glance the syntax seems correct and the time variable t is the same in PsychoJS and PsychoPy. Could you share the experiment repository?
The button shows up as soon as the marker position has a value. It just doesn’t wait for the t > 7. I’m not exactly sure how to share the repository, as I’m a bit new to GitHub and, to be honest, even the creation of the SSH key is confusing me.
If you go to the project page on the Pavlovia dashboard and then click the “View code” button (in the top right by “Pilot” and “Run”), it will take you to the GitLab repository for that project. In GitLab, if you go to the bottom of the left-side menu you will find “Settings”, click there, and then under that click “General” and scroll to “Visibility”. Expand that section and change the visibility to “Internal” or “Public”. After that you just need to copy the URL for the repository and paste it here.
Thank you so much for those detailed instructions. Here’s the link: Sign in · GitLab
Unfortunately it looks like I don’t have permission to view it still. Did you make it visible internally or publicly?
You can also go to “members” in the left hand menu of the project and add me manually (@jfkominsky)