Good Evening! I have to program for a school project a program with greenfoot. I have finished almost everything but I have on problem. You can see it in the yt-video below.
So when I have crashed into the car, I will lose my wood. But if I want to take anotherone I have the problem that the shown wood will stay on the ground and I have one in my hand(of my character). It is duplicated. But this happens only if I take the same wood. In the clip you can also see my code. "Holz" means wood:D I have checked my variables. I think the problem is somewhere while spawning the wood. Is it possible that the program does not think it is the same wood becaus it has no array(like in the class world)?
Whats the best way to fix this? I hope you understand everything! Thank you!


