I was wondering if there was a way to change the value of
t depending on when a participant responds.
The task I have set up is as follows:
- Participant sees a square oscillate on screen
- Participant then sees a thin rectangle that will grow depending on how long the space key is held. This is done by the calculation:
sq.width = (10 * (t * 5))where
sqis the object to be grown.
Currently, if a participant decides not to press space for let’s say, 5 seconds, the square will initialize at (10*(5*5)) and then grow accordingly.
I have tried something such as:
new_t = t*0 however this clearly just makes
new_t = 0 and the shape will not update
I have also tried
sq_key.clock.reset();, but this does not work either.
Any advice would be greatly appreciated, thank you!