0 votes

I have a scene in which I have an area node. I want this area node to send a 'body entered' signal to a body in another scene. (I will then want to instance this scene in the other scene which also has the body in it.)

My Connect Signal screen only allows me to connect the signal to nodes which exist in the same scene as the area node. My rigid body to which I want to connect is in a separate scene though.

The screen has a 'Path to Node' field at the bottom. I've tried using absolute paths here to connect to my target body, but I always get the same error: Target method not found! Specify a valid method or attach a script to target node.

Please help.

in Engine by (367 points)

How does target scene receive signal when it is not even instanced ?

It's instanced a few times and will be a few more times. This wasn't the problem. The problem was that using Godot's connector screen only allows you to connect signals to nodes in the same scene as the emitter's.

I've figured it out though. I manually connected the area node's 'body entered' signal to my rigid body in a script instead using get_node. I find it weird however that the connector screen would not allow it. Seems a very basic thing.

Sorry I misunderstood you. I thought you were asking how do connect signal to an uninstanced object. Anyway, I have almost never used built in connector. I have always just coded it in.

I believe in this case you simply connect it through code. I assume that when your code actually run both scenes will be loaded, in that case you should be able to connect it to where you want, to check what the path is like when that happens you can open the debugger and click on the Remote button to check what your scene tree currently looks like.
Personally, when I need to do this kind of stuff, where my scene tree might be different depending on how my game is progressing, I create helper methods at the scenes root script to get whatever is inside, the path to the signal in your case.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories