Hi Kontroll,
It’s great to see that you are challenging yourself. ![]()
Regarding your ideas, don’t hestitate to modify Rick’s code.
Ideally, we want to check whether the particle system is already playing before calling its Play(). Otherwise, it might be that the particle system gets reset. We do the same for the audio source.
Have you already tried to add Debug.Logs to your code to see what is going on during runtime? If you get click sounds, it might be that the audio source gets stopped and started every other frame. This is not what is supposed to happen in the game. We want to stop the audio source only when we do not move the rocket anymore.
A common mistake is to stop the audio source every other frame. Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?
If necessary, draw the logic flow with a pen on a sheet of paper. That’ll make it easier to write the if-statements. The concepts in this game are not difficult but we have quite a few ideas, so the code is fairly long. We have to pay close attention to the curly brackets, so we do not inadvertendly declare an if-statement within another if-statement (unless that’s required by our concept).
See also:
- Forum User Guides : How to mark a topic as solved