Howdy, Stranger!

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

Supported by

[open] problem of the neverending loop

edited November 2014 in OpenSesame

hello :)
i have a repatative question, concerning how to end a cycle to be able to move onto an experimental loop after a practice run.
the experiment im presently trying to recreate is change blindness, where one is present with an image followed by a blank image and then the first image with a missing object in it.
the loop works fine; as in it repeats the images as desired,but the problem arises when i hit the space key (which has been identitifed as the key reponse) and the cycle refuses to stop.

i have checked older discussions and tried implementing their solutions, but they have failed to work for me.

anyone got any ideas?

warning: im new to open sesame and have never used python before this.

Comments

  • edited 1:34PM

    Hi,

    Let's say that you have the following structure:

    image

    Here, the flicker_sequence presents one image, followed by a blank, followed by another image, followed by another blank. Each sketchpad is followed by keyboard_response that has a timeout of 500 ms. The result of this is that flicker_sequence presents images at a rate of 1 Hz.

    Now let's say that in the flicker_sequence has the following run-if statements:

    image

    This means that once you press space, all subsequent items in the sequence will be skipped. So this allows you to stop flicker_sequence by pressing space.

    Of course, you want to repeat flicker_sequence until the participant actually presses space. You can do this by setting the repeat value in flicker_loop really high. And to make sure that flicker_loop also stops when space is pressed, you can set its break-if statement (under 'Show advanced options') to [response] = space.

    You see the logic here?

    One final thing to do is make sure that the variable response exists and doesn't have the value 'space' when flicker_loop starts. Because that will either give an error (if it doesn't exist) or cause the loop to not run at all (when response already has the value 'space'). To do so, simply add a simple inline_script before flicker_loop to reset the variable response, like so:

    exp.set('response', None)
    

    See? Easy peasy. You can download a simple example script here:

    Cheers,
    Sebastiaan

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