Skip to content
Discussion options

You must be logged in to vote

Hi @Raphael-Merz,

I also tried to create some variable that'd change with each "first_fixation_of_a_trial" but that didn't work either.

I think this is the approach that I would take. It is a bit tricky to implement because you have to use a dynamic parameter.

Here's a simplified example:

var block_index = -1; // starting this at -1 so the first block is 0 after incrementing.

var first_trial = {
	// whatever parameters you need here
	on_start: function(){
		block_index++;
	}
}

var block_timeline = {
	timeline: [ first_trial, second_trial, third_trial ],
	data: {
		block_id: function() { return block_index; }
	}
}

This should add block_id to every trial in the block_timeline, and use t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Raphael-Merz
Comment options

Answer selected by Raphael-Merz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants