Always making a certain block appear after another block


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Event attributes like /ontrialbegin, /ontrialend, /onblockbegin, /onblockend, etc. are supposed to execute some logic / expressions (e.g. update some global variables, etc.). They cannot be used to invoke other <trial> or <block> elements. That's what the /branch attribute is for, as you've already discovered.

Sercan
Sercan
Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)
Group: Forum Members
Posts: 25, Visits: 120
Update: I managed to get this to work simply by adding: /branch = [survey.Jantje1survey;] to the element. I'm glad it works, but I don't know why.
Sercan
Sercan
Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)Partner Member (953 reputation)
Group: Forum Members
Posts: 25, Visits: 120
Hi,

I'm intending to show my participants a number of stimulus blocks in randomized order. After each of these stimulus blocks, I want to start another block containing survey questions specific to the stimuli presented in that block, and then select another randomized stimulus block to continue, and so forth. How would I implement this? It cannot be done inside <expt> since the order of the blocks must be randomized.
I currently have this, which doesn't work.

<block Jantje1>
/ onblockend = [values.stopblock=0; survey.Jantje1survey;]
/ stop = [values.stopblock==1]
/ trials = [1=getstim]
</block>

note: trial getstim sets values.stopblock to 1 when the stimuli have been presented and the block must end. the survey works when called from <expt> but not when called this way. this does not work either: /branch [if (values.stopblock==1) survey.Jantje1survey] 

regards,

Sercan
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search