Overlapping item issues?
-
When I tried to overlap the item and pick up, it will have the error like this image. If I tried to press key many times, it's still pick up the item after delay some second. How can I avoid or fix this issue?
-
Your error says that the "_on_area_entered" function cannot be found, so focus your attention on that it.
I tried to copy your code (in a simpler version), but I got no error for it.Maybe your "_on_area_entered" function is not properly connected to the "area_entered" signal. To make sure, you could reconnect the signal again.
Maybe connecting the signal directly in code will fix it. In the _ready function, you would need to write:
connect("area_entered", _on_area_entered)
For better understanding of my statement above, watch this video https://youtu.be/qkLBzm5D3RsOverall, I am very unsure why your error happens. It is strange that it suddenly starts working after a few seconds.
-
@lemu_kymoh thanks for your help. I have a mistake when I fogot to turn off the comment in another script. I have changed the connect method too and it's work. Actually, it's still delay a bit but I don't think it will become a big problem.
-
I am glad it is working now. Hopefully you can get around the delay.