Area2D problems

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GunPoint
:warning: Old Version Published before Godot 3 was released.

I think this is the 3rd time i ask this question
The problem is, i found another way to do what i need but i still can’t figure out something
SO
I have a player. The player is an instanced scene in a scene called Game. I want to make a system like in Skyrim (not exactly), when the player gets near an object (like a chest) a button should appear showing what key u need to press to interact.
So i made the buttons TextureFrames and set them to be invisible when the game starts
I added to the texture frames some Area2D’s so i can know when the player enters that area
I connected a signal ‘body_enter’ to the Game script. In the game script i wrote ‘print(body)’ to see what bodies enter that area, body being a parameter.
The problem is, when i enter that area, nothing happens, nothing prints
It may be a bug, so if can anyone tell me other way to do this, i would be happy.
Because of that, i cant continue making my game, im trying to solve this for 2 entire days.
Please help…

You’re probably misunderstanding the behaviour of those signals. I can’t tell you how to do it, because I’m a newbie myself, but try using the documentation and looking for tutorials regarding Area2D (YouTube videos for example).
I’m pretty sure there are some videos useful to you.

DodoIta | 2017-10-14 08:49

are you sure that the function declaration had a variable for the body?

aka:

func something_entered_omgomgomg(var body):
       Some code here

and not:

func something_entered_omgomgomg():
     Some code here

rustyStriker | 2017-10-14 18:36

yes… i solved that… the problem was the collision shapes… The players collision shape wasn’t connected to his scene but to the main scene

GunPoint | 2017-10-14 19:04

well that is kinda funny and facepalmly as heck

rustyStriker | 2017-10-14 19:08