Howdy, Stranger!

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

Supported by

Keyboard Response is not updated and [correct] remains 0 all the time

Hello all,

I am new to opensesame, and have tried to make a basic block that shall play two audio files, and get input from the user if the two tunes played were same or different. I take in a keyboard response as 1 for same and 2 for different.
In my loop i have added, for each combination of the audio files, a corresponding "correct_response" value, as 1 or 2.

For feedback to the user if the choice for correct ot incorrect , i have used a feedback item tool and used "run-if" [correct] =0 for incorrect and [correct]=1 for correct.

Yet, the result shown is always incorrect. I tried to run the variable inspector to see where the issue might be, and find that [correct] variable is set to 0 while before the second audio is played, and remains the same for all the trials irrespective of the keyboard response given.

Please let me know my next course of action to solve this.

Thank you!

Comments

  • Hi,

    It seems the variable [correct] is not updated automatically. So basically, the comparison response == correct-response is not done.

    If you change your run-if statements to [response]=[correct_response] and [response]!=[correct_response], it should work.

    Good luck,

    Eduard

    Buy Me A Coffee

  • Thank You Eduard! Worked Perfect

  • edited August 2016

    Also, If i want a screen display when the time for keyboard_response overflows (beyond 12 seconds in my case) , what condition do i give in the run-if statement?

    [response] = [none]
    [correct] = [none] do not seem to work.

    If there is no key pressed also, the reply says it is incorrect, hence i wanted a screen that tells no response was detected.

    Thanks in advance!

  • Hi,

    Did you try using [response]= None, for when no response was given?

    Additionally, you can change the condition of a false response to:

    [response]!=[correct_response] and [response]!=None, to make sure that it is only shown if a wrong response was given and not when no response was given.

    Does this work?

    Eduard

    Buy Me A Coffee

  • I seem to have a similar problem. I am trying to give feedback depending on whether participants choose the up or down key. When I use a feedback item, [response] has the latest response, but with a inline script or sketchpad [response] contains the previous key press. Attached I have the script. Did I do something that caused the lag?

  • Hi Froukehe,

    Feedback items are prepared in the run phase, Sketchpads in the prepare phase and depending on where you put your code in an inline_script it can be either. The response variable is defined on run time, that means that whenever you present the feedback in the prepare phase it will use the response from the previous trial. Whenever you present feedback in the run phase, it will use the current response (provided that the response has already been given).

    Does that make sense?

    Eduard

    Buy Me A Coffee

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