Context: I have a game that I wanted to add a sound to. Since I was using Python, I had my script play a sound using aud, though the game played the sound twice. I changed it trigger a sensor, and the sound still went twice. I soon found out that the script was running twice, so I dissected my game trying to figure it out.
Eventually I made a new .blend file and added a single cube. I set an Always sensor with a tap pulse to run a python script with one line:
And when I ran it there were two As in the console.
Question: Has BGE always run scripts twice? I’ve never had this issue before but I usually don’t have scripts run. It also doesn’t run it twice on the same frame, since the sound playing twice is somewhat noticeable (enough for a short click to sound like two)
Is there a fix for this?