resizing cross

 Author Message tecnika Distinguished Member Group: Forum Members Posts: 117, Visits: 542 Hello, is there a quick way to resize the two dimension of a cross separately with the arrow keys?e.g. making vertical line longer with top arrow key, shorter with low arrow key; horizontal line longer with right arrow key and shorter with left arrow key?Thank you Dave Supreme Being Group: Administrators Posts: 9.1K, Visits: 39K +xtecnika - Wednesday, June 27, 2018Hello, is there a quick way to resize the two dimension of a cross separately with the arrow keys?e.g. making vertical line longer with top arrow key, shorter with low arrow key; horizontal line longer with right arrow key and shorter with left arrow key?Thank youYou would define two elements that make up your cross -- one horizontal line, one vertical line. You can then manipulate those lines' sizes separately based on the response. Something like this:/ trials = [1=sizetrial]/ h = 20px/ v = 20px/ stepsize = 5px203 = left205 = right200 = up208 = down/ ontrialend = [    if (trial.sizetrial.response == 203 && values.h >= 0) values.h -= values.stepsize;    if (trial.sizetrial.response == 205) values.h += values.stepsize;    if (trial.sizetrial.response == 200 && values.v >= 0) values.v -= values.stepsize;    if (trial.sizetrial.response == 208) values.v += values.stepsize;]/ stimulusframes = [1=clearscreen, h, v]/ validresponse = (203, 205, 200, 208, 28)/ branch = [    if (trial.sizetrial.response!=28) trial.sizetrial;]/ shape = rectangle/ color = black/ erase = false/ position = (50%, 50%)/ size = (values.h, 10px)/ shape = rectangle/ color = black/ erase = false/ position = (50%, 50%)/ size = (10px, values.v)

Select a Forum....
 Millisecond Forums      Millisecond Software News      Inquisit 5      Inquisit 4      Inquisit 3      Inquisit 2.0      Inquisit 1.33 (archives)