Hello everyone,
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.
https://archive.org/download/dectation-for-new-primary/dectation%20for%20new%20primary.rar
thank you.
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.