Reply To: Refreshing canvas

PennController for IBEX Forums Support Refreshing canvas Reply To: Refreshing canvas

#6985
Jeremy
Keymaster

Hi Rafael,

The last command in your trial is wait on the Button element, so whenever the button is clicked, the trial ends, and all elements are removed from the page, so you’ll just no longer be able to see any changes to the Canvas elements after the click. You will either need to keep track of things across trials using a global Var element and testing it at the beginning of the trial to run different add or print commands accordingly, or change your approach of your task and incorporate it within a single trial

A couple tips: if you’re not getting the Text elements, you don’t need to explicitly give them names (right now you’re creating two distinct elements both named “player 1” and three distinct elements all named “player 2”). Timer elements have no visual content, no it doesn’t make much sense to add them to a Canvas element. You could simply attach your callback commands directly onto the newTimer command (also, you can pass three comma-separated commands to callback, no need to call three callbacks in a row)

Jeremy