In this game I want a student to choose the right letter and touch it, Then the game must tell him is that was right or wrong by a simple sound, But here is the problem, that the two sounds for wrong and right play together, please watch my events and help me.
Could you post a screen grab of the sound events?
How do you know it’s the two actions you’ve indicated? There’s an event at the top of the image that plays the blob.mp3. Are there any other places it plays music?
To debug, I suggest you disable all the events with the wrong sounds, and test only the correct sound plays by making a correct letter touch. Then reintroduce the wrong sound one by one, and as you enable an event, test the correct letter touch. This way you will identify the offending event.
I tried this before and didn’t have any result, If you please open this game and I’m sure you will find a solution. When I removed the error sound the right sound played correctly, But when I removed the right to sound the error sound played incorrectly, it played even with the right answer. I noticed that But couldn’t understand why, so I ran to you.
In the image you have provided, in the first event the condition is that animation of l1 is “loop”. The action of that event pauses the animation. Note that the animation of l1 is still “loop”, but it’s just not playing.
In the second event, you check if the animation of l1 is “loop”, and the wrong letter is chosen. When you select a letter that shouldn’t be in l1, all the conditions for the second event are true, and so the error sound is played.
So the problem is that you are pausing the animation, when you should be setting it to “anim”.
I understood you, I tried that but didn’t work also.
You need to tell the different buttons if the other buttons have already been pressed or not.
So if ‘L’ is clicked, the ‘P’ event is triggered again creating the error sound, because the loop4 “loop” animation is still active: you only check if loop4 animation is “loop”, you also have to add the conditions loop3, loop2, loop1 are NOT “loop”.
Same for the second button. you only check if loop3 is “loop”. You also need to check that loop2 and loop1 are NOT “loop”.
Also I recommend that you check each button backwards.
for example if you want the player to click the order p-l-a-y.
The check y first if it’s clicked, then a, then l, then p. This way you avoid triggering a chain reaction where one condition immediately triggers the next, and you get wrong or doubled sounds.
If you create complex conditionns like that, my recommendation is always to start with a small prototype, and test each step and function, maybe display and trace in a text object that all variables behave the way you want, and build it up slowly.
Beaten Yes, so it looks like this :
And put a trigger once for the collision between aseel and lineya22 :
Otherwise l4 will be set to animation named “loop” every frame, kicking off the error sound effect for l4. with every button click that’s not “P”.
Thank you both, I tried all your advice but it looks impossible to succeed, this devil error sound is still there, I made it loop1,2,…etc. I put trigger once with Aseel, but It failed, I tried to create another condition when the letter is in its position, So the right sound plays, the animation changes, But still have the error sound, I think it’s like a fate here.
I already had your project open, so I might as well quickly implement it:
I swapped the order and added the additional conditions I mentioned above.
The sound works fine now. Take a look how I did it.
I’d really recommend you play around with smaller projects and variables a bit, to understand how it all works, and probably you will be able to create systems like this with less conditions and variables much faster in the future.
Maybe another tip is to always place the “Trigger Once” on the very bottom of each condition, not inside an “And” / “Or” statement.
Thank you, I can’t believe that, I’m outside, for now, I will study this when I come back, many thanks to you.
Sorry, Because I really didn’t understand how to do it for all my game, I gave up it, But you did your best, I tried this and others, for example, I deleted all animations and tried it with the position of l1, l2, …and when a letter is done the next L appears, But still have error sound in the right answer.
So, Thank you, The fault is in me.