Thanks! This helped a lot.
My mistake was to try to use the container that has the can and the plant to connect the signals.
I have a box container called GameWindowContainer that holds the pot and the plat.
I was running this in the script attached to the container:
var potplant = $PotPlant
var plant = potplant.get_node("Plant")
connect("area_entered", plant, "_on_Plant_watering_entered")
I know that plant was targetting the "right" node in the "PotPlant" scene because when I called queue_free ()
on it the plant disappeared.
When I moved the connect
to the Plant node and changed it to self
it works.
I'm guessing that the signal "area_entered" is on the local object (in my case this was the containing node) and the second argument is only used for the method to be called.
Thanks for all the help!