- Edited
_on_Cell_input_event
What causes that event to be triggered?
You might add to that function:
print_debug(event)
_on_Cell_input_event
What causes that event to be triggered?
You might add to that function:
print_debug(event)
If you make an intermediate script, and catch a signal in it, then everything is in order.
The problem is, if we send a new click_cell signal from the _on_Cell_input_event signal, then it fires 4 times
CrySani This is perhaps worth reporting to the issue tracker.
I'm guessing you have four objects spawned. One global signal is connected to each object, so every time it's sent, every object will respond with the same argument. That's assuming _on_Cell_input_event() is called from _input() or similar. It would help if more of your code was visible.
If you do this, they'll only respond when they get a signal meant for them.
func clickCell(arr):
if arr[0] == self:
print(arr[0])
What is triggering the callback and how many objects are in the scene? Also, the logic doesn't really make much sense. You are sending a signal to a global only to call a local function. You could eliminate the signal altogether and just call the function.
cybereality
Yes, that's possible. But the logic of work is such that copies of classes should not know about other copies. Just catch signals. And the signal is generated by the copy that was clicked on.
I see, okay.
Question, what is invoking '_on_Cell_input_event', what signal is it connected to? Because that function's argument signature is not familiar to me.