playing sound when wrong answer

Hi Guys

I have 3 actors, each actor has showing text answer, when the user presses an actor ( if it is correct answer) the sound should be played, and when it is wrong wrong sound should be played

how can I do that ??

Comments

  • Thunder_ChildThunder_Child Member Posts: 2,343

    I woukd think that you must beusing three "when touched" attributes of some sort right?

    Simply place a "play sound" behavior under this along with where you have a make true or false change attribute. Ding for correct...buzz for incorrect.

  • alzawadhadialzawadhadi Member, PRO Posts: 19

    I have tried that
    but, both sounds is played when the actor pressed, even though that I have but the wrong behavior on the otherwise

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    In the rule use the 'otherwise section'. If the correct answer is clicked, play a 'good' sound in the main section of the rule, in the otherwise section play the 'bad' sound.

  • Thunder_ChildThunder_Child Member Posts: 2,343

    Could you also just make rules for each answer? Change all to 0...if 1 then play correct sound if 2 play bad? At next question change all to 0 again?

  • alzawadhadialzawadhadi Member, PRO Posts: 19

    @Thunder_Child said:
    Could you also just make rules for each answer? Change all to 0...if 1 then play correct sound if 2 play bad? At next question change all to 0 again?

    could you please detail it ?

  • Thunder_ChildThunder_Child Member Posts: 2,343

    I could try to make a small demo tonight for you to recieve in the morning. Im not at home at the moment.

  • I_AM_BENJII_AM_BENJI USAMember Posts: 40

    @jamie_c said:
    In the rule use the 'otherwise section'. If the correct answer is clicked, play a 'good' sound in the main section of the rule, in the otherwise section play the 'bad' sound.

    do what this guy said

  • alzawadhadialzawadhadi Member, PRO Posts: 19

    I did that, but the both sounds working when the answer is correct

    see this is my rules

    any correction ?

  • alzawadhadialzawadhadi Member, PRO Posts: 19

    could you please clarify ?

  • SocksSocks London, UK.Member Posts: 12,822

    @jamie_c said:
    In the rule use the 'otherwise section'. If the correct answer is clicked, play a 'good' sound in the main section of the rule, in the otherwise section play the 'bad' sound.

    Do what this guy said 2.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I did that, but the both sounds working when the answer is correct

    Can you type out or post a screenshot of the entire tableCellValue expression? And also, what are the possible values of that expression? Is it possible that your game.com... attribute could equal more than one value in a short period of time (e.g. a second or two) and therefore trigger the rule twice? What happens when you put a Log Debugging Statement in both sections of that rule (the correct portion and the incorrect/Otherwise portion)? If you open the Debugger window do you see both statements or only one?

    Is it possible that you have duplicate rules in an actor or duplicate actors in a scene?

Sign In or Register to comment.