Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Issue with Arrow Position in IOWA Gambling Task Online Version - javascript

Dear all,

I am in the process of developing an online version of the IOWA Gambling Task and I’ve encountered a small issue that I hope you could help with.

In this task, participants choose a card from four decks, with each deck offering different rewards or penalties. After a participant selects a card, I would like the selected card to be visually highlighted.

To achieve this, I’ve decided to use an arrow to indicate the chosen card. I created the arrow on a sketchpad, and its x-position is determined by a JavaScript function placed after the keyboard input and before the sketchpad.

While this setup should work in theory, the arrow is consistently showing the position of the previous trial. For example, if a participant chooses deck 1 on trial 1, the arrow does not appear. However, in the second trial, if they select deck 3, the arrow is displayed below deck 1, even though it should be placed below deck 3.

I’ve attached the OpenSesame file for your reference. The creation of the x_arrow variable is in the "update_arrow_keys" script, while the arrow itself is displayed in the "feedback_sketchpad" sketchpad.

You will notice some lines of code in the file that are currently not performing any essential functions; these are from various solutions I have tried. However, they should not affect the overall experiment.

Any insights or suggestions you have would be greatly appreciated!

Best regards,

Michele

This is an embed external element. It can be deleted using the delete key or the backspace key. To view the full element, press the preview button below.
File
IOWA_online2.osexp
70.95 KB


Comments

  • edited April 10

    Hi @michelescandola

    I ran into the same issue and managed to solve it by moving the feedback sketchpad to the very beginning of the sequence. This way, it uses the updated x_arrow value from the previous trial, as the sketchpads seem to be prepared in advance at the start of each trial (and therefore do not take into account updates that occur later in the trial).

    Let me know if this solution works for you!

    Claire

  • Thank you very much, Claire.

    Your solution resolved my issue from a practical standpoint.

    However, I still don't fully understand why my original version wasn't working. Nevertheless, considering that OpenSesame is a free tool, we should be very grateful for its availability.

    Thanks again!

  • Hi @michelescandola

    Glad it worked!

    Sorry for not being clearer earlier. Your original version didn't work because sketchpad items are created at the start of each trial (i.e., in a "prepare" phase of the sequence, to ensure better timing; see documentation here and here).

    These sketchpads are then drawn as needed during the trial (in a "run" phase), but aren't updated until the next trial when the sketchpad is re-created at the beginning of the sequence, with the new parameters :

    [...] the contents of a sketchpad cannot depend on what happens during the sequence that it is part of. For example, you cannot use a sketchpad to provide immediate feedback on the response time collected by a keyboard_response item (assuming that the sketchpad and keyboard_response are part of the same sequence.)

    This would explain why changes made during the trial weren't reflected in your sketchpad.

    I hope this makes sense!

    Claire

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games