|Topic was automatically imported from the old Question2Answer platform.
I don’t know how to explain this but I will try.
Two days ago , I managed for my brick breaker game to have the “multi-balls” superpower. Basically, I instance 2 more balls. They didn’t collide(because of collision layers&masks), they all had the exact speed(at least I think so) ,it was perfect,it worked.
Yesterday, I tried adding a new power, and I didn’t manage. I was thinking okay, well I will try again tomorrow, so I pressed CTRL+Z and undo all my changes.
Then , my balls started acting really weird. They collided and they all had different speed. And on top of that, they didn’t count the bricks right. Every ball had a different countdown, even though before they all had the same one. So basically, I didn’t change anything in the code, but this happened.
I created a new ball scene, with the exact properties as the last one, and they didn’t collide anymore. I don’t know why that happened. They still didn’t count the bricks right, but I solved that problem.
Why did this happen? The code was perfect two days ago, now I complicated things a little because I wanted to repair this. Nothing changed, literally nothing. When the “you win” and “you lose” layer showed, only the first ball dissapeared, not the other 2, but two days ago this wasn’t a problem. (I solved this problem too)
What I observed is that two days ago, the three balls were the exact identity of one scene and shared the properties and script. Now it is like they are 3 different scenes. I don’t know why, I didn’t make them local. I just want to know why this happened, because I really fricked out when suddenly my code didn’t work.
Would you mind sharing your project in a zip file?
You could try checking out the remote scene tree to validate the balls are instanced correctly. When you launch your game from the editor, a new tab “Remote” appears in the scene tree dock. If you click it, it’ll show the scene tree of your running game instead of the opened scene.
Bernard Cloutier | 2020-10-08 13:33