Hi, so i want to emit a signal when the axe has touched the tree 3 times. I get the error: @ _ready(): In Object of type 'CharacterBody2D': Attempt to connect nonexistent signal 'CollisionsWithTree3' to callable 'Area2D(Baum.gd)::collwithtree3'.
Hi, so i want to emit a signal when the axe has touched the tree 3 times. I get the error: @ _ready(): In Object of type 'CharacterBody2D': Attempt to connect nonexistent signal 'CollisionsWithTree3' to callable 'Area2D(Baum.gd)::collwithtree3'.
You need to remove that ()
from your signal name. You need parenthesis on your signals only when you want to send parameters with it. And if you do so, you have to put some variables and optional a type for those inside the parenthesis.
No parameters:
signal health_depleted
With parameters:
signal health_changed(old_value, new_value)
Taken from:
https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html
Auriol I tried it but it still doesn't work
From where is _on_axe_tree_collision() called?
Does it print "sde"?
Auriol Yea it prints sde. Thats the rest of my code (pls don't mind the bad movement script XD):
Are you using Godot3?
Auriol no godot 4.2.1
Sorry, I'm somewhat lost right now. Especially about the signal connections. Can you maybe upload your project somewhere so I can test it?
However, I'm going for a walk now ^^
Auriol I have it on github is your name the same as here? I should maybe also go for a walk for once xD
I was lazy, short walk. 😃
That's me: https://github.com/TAGames However I'm not really familiar with github.
Auriol I invited you
Got it. Can't open some scenes, because baumchara.gd is missing. Now I'm figuring out how to remove those dependicies.
Auriol i removed them i don't know why they are still there
Ok, I just create some empty script for baumchara.gd and now I can look at it.
Hmm, I think you general node structure is pretty messed up.
Are the trees supposed to be moved?
EDIT: Or could you tell me what you are trying to achieve?
Auriol no the tree can just stand there
Ok and you want a player that can move and chop trees and switch weapons/tools?
Auriol you can already do it by clicking f/r and I'm trying to make it so you can cut them down but the signal doesn't work somehow
Give me an hour or so ^^ Then I can explain/show some things.
Auriol thanks bro^^
© 2022 - 2024 — McMap. All rights reserved.