PennController for IBEX › Forums › Support › How to add a "come back" button to the practice trial › Reply To: How to add a "come back" button to the practice trial
Hi, Jeremy! Thanks for your answer!
I guess I’m doing something wrong…whenever I put the code on the second instruction page (“E”, after the practice trial), the trial ends after the practice and it doesn’t even show the other instruction (E) set.
newTrial("instructions_E", newText("instructions-1","Are you ready?") .cssContainer({ "border": "5px solid black", "background-color": "yellow", "color": "black", "font-size":"50px"}) .center() .print() , newText("instructions-6","<p>Feel free to take a break now</p>") .cssContainer({ "font-size":"22px", "text-align": "center"}) .center() .print() , newImage("boy-image","boy.png") .size(200,200) .center() .print() , newText("instructions-7","<p><center> If you want to practice again, click on the button below") .cssContainer({ "font-size":"22px", "text-align": "center"}) .center() .print() , newButton("come back","PRACTICE AGAIN") .callback(jump ("intructions_D"), end () ) .center() .print() .wait() , newText("instructions-8","<p><center>When you feel <b style=color:red;>READY</b>, click on the button below:</p></center>") .cssContainer({ "font-size":"22px", "text-align": "center"}) .center() .print() , newButton("wait","START THE GAME") .center() .print() .wait() );
My practice trial, in fact, is a r(shuffle) of eight trials, that’s why I’m trying to come back to the last instruction page before the practice trial begins, I don’t know if the .callback function would apply to this: (but it would be okay if it came back to instructions_D)
this is my actual “pratice trial” : rshuffle("p_trial_1_no_cue_UP","p_trial_1_no_cue_DOWN","p_trial_2_center_cue_UP","p_trial_2_center_cue_DOWN","p_trial_3_double_cue_UP","p_trial_3_double_cue_DOWN","p_trial_4_spatial_cue_UP","p_trial_4_spatial_cue_DOWN")
I tried to write just “.callback(“intructions_D”)”, the instructions_E page appeared, but fun thing the button didn’t return to the instruction_D page, when I clicked on it, it just lauched the “start the game button” . This is my actual sequence sequence, I tried to simply it earlier, but maybe I’ve omitted something important:
Sequence("instructions_A", "instructions_B", "instructions_C", "instructions_D", rshuffle("p_trial_1_no_cue_UP","p_trial_1_no_cue_DOWN","p_trial_2_center_cue_UP","p_trial_2_center_cue_DOWN","p_trial_3_double_cue_UP","p_trial_3_double_cue_DOWN","p_trial_4_spatial_cue_UP","p_trial_4_spatial_cue_DOWN"),"instructions_E", rshuffle("trial_1_no_cue_UP","trial_1_no_cue_DOWN","trial_2_center_cue_UP","trial_2_center_cue_DOWN","trial_3_double_cue_UP","trial_3_double_cue_DOWN","trial_4_spatial_cue_UP","trial_4_spatial_cue_DOWN"),"send","telaFinal");
thanks in advance!