how to introduce a delay to cursor movements.


Author
Message
peter
peter
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 59, Visits: 189
Hi all, in my current script I need participants to move a mouse that moves an on screen object along the horizontal plane.
Simple enough with / ontrialbegin =[picture.blob.hposition = mouse.x / 25.6;] 

However for some conditions I need to introduce a delays between the movement of the mouse and the movement of the object. 
Does any one know how to achieve this please?
Many thanks in advance,
Peter
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: 12K, Visits: 85K
peter - 8/29/2022
Hi all, in my current script I need participants to move a mouse that moves an on screen object along the horizontal plane.
Simple enough with / ontrialbegin =[picture.blob.hposition = mouse.x / 25.6;] 

However for some conditions I need to introduce a delays between the movement of the mouse and the movement of the object. 
Does any one know how to achieve this please?
Many thanks in advance,
Peter

More details, please. What do you mean by "introducing a delay between the movement of the mouse and the movement of the object"?
peter
peter
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 59, Visits: 189
So that there is  a delay between my movement of the mouse and the movement of the object.
Think of it as a time lag effect. 
This I will need to adjust by condition

condition 1 = 0ms lag 
condition 2 = 100ms lag 
condition 3 = 200ms lag

many thanks
Peter
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: 12K, Visits: 85K
peter - 8/29/2022
So that there is  a delay between my movement of the mouse and the movement of the object.
Think of it as a time lag effect. 
This I will need to adjust by condition

condition 1 = 0ms lag 
condition 2 = 100ms lag 
condition 3 = 200ms lag

many thanks
Peter

Would you have some example code for the 0ms lag?
peter
peter
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 59, Visits: 189
i was locking the object to the mouse along the horizontal axis 
[picture.blob.hposition = mouse.x / 25.6;]

thanks
peter
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: 12K, Visits: 85K
peter - 8/29/2022
i was locking the object to the mouse along the horizontal axis 
[picture.blob.hposition = mouse.x / 25.6;]

thanks
peter

Could I have actual code that runs, please, instead of a single line? I don't want to make something up from scratch that may or may not end up being similar to what you're actually working at.
peter
peter
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 59, Visits: 189
Dave - 8/29/2022
peter - 8/29/2022
i was locking the object to the mouse along the horizontal axis 
[picture.blob.hposition = mouse.x / 25.6;]

thanks
peter

Could I have actual code that runs, please, instead of a single line? I don't want to make something up from scratch that may or may not end up being similar to what you're actually working at.

I am having issues uploading my compressed folder , keep being told that i have exceeded my upload limit,
peter
peter
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 59, Visits: 189
Dave - 8/29/2022
peter - 8/29/2022
i was locking the object to the mouse along the horizontal axis 
[picture.blob.hposition = mouse.x / 25.6;]

thanks
peter

Could I have actual code that runs, please, instead of a single line? I don't want to make something up from scratch that may or may not end up being similar to what you're actually working at.


Attachments
Agnese experiment 4.iqx (98 views, 15.00 KB)
peter
peter
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 59, Visits: 189
Dave - 8/29/2022
peter - 8/29/2022
i was locking the object to the mouse along the horizontal axis 
[picture.blob.hposition = mouse.x / 25.6;]

thanks
peter

Could I have actual code that runs, please, instead of a single line? I don't want to make something up from scratch that may or may not end up being similar to what you're actually working at.


peter
peter
Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)Expert (1.1K reputation)
Group: Forum Members
Posts: 59, Visits: 189
Dave - 8/29/2022
peter - 8/29/2022
i was locking the object to the mouse along the horizontal axis 
[picture.blob.hposition = mouse.x / 25.6;]

thanks
peter

Could I have actual code that runs, please, instead of a single line? I don't want to make something up from scratch that may or may not end up being similar to what you're actually working at.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search