Pavlovia, code component problem

URL of experiment: Sign in · GitLab

Description of the problem:
Hello,

I want to run a mental Rotation task in Pavlovia. The task has 42 trials and I want participants to have a 1-minute break after 21 trials. To do this I created two variables and wrote a code that stops the experiment on the 21st trial, waits for 60 secs and automatically initiates the new set of trials. (please see the image for the code).
The experiment runs in PsychoPy (version 2020.2.10) perfectly and the code works. However, when uploading and running the experiment in Pavlovia I get a reference error which says that one of the variables (CubeBreak) is not defined. Upon inspecting the .js files I found out that indeed this specific variable was not defined (although it exists in the following code).
I tried to define the variable by editing the .js code. The experiment ran smoothly, but the break never happened. It was like the pavlovia didn’t recognize the code for the break.

Any idea how to solve this?

Many thanks


Hello

add

CubeBreak = 0

to Begin Experiment.

Do the same for breakDuration :wink:

Best wishes Jens

Hello,

It worked! Now the experiment stops for one minute when it reaches the 21st trial.

Thank you so much :slight_smile:

Best, Flora