-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call_group() does not always call all nodes in the group #44765
Comments
so main scene is... res://src/custom/CGFMain.tscn
|
I meant, git clone the repository, switch to the branch I mentioned and just run the whole project with F5 :) CGFMAin.tcsn should be already set as the main project scene.
Did you switch to the |
i could reproduce described issue with your steps |
That's going to be quite tricky as there's a lot of interconnected pieces before one gets to that point. I think this bug appears precisely because of some weird interaction in the whole process. I do not know how Godot development works, but an alternative would be if one could attach a breakpoint in the C++ code at the point where it's calling the groups,it might point out why the signal card is not being called. |
@db0 Can you (or anyone else) still reproduce this bug in Godot 3.3.3 or any later release? If yes, can you reproduce this after switching to |
Tried it just now (same branch as in my report). Issue persists using the |
Can confirm (only 2 "bio" tokens appear). I've opened a PR with the fix, with it applied 6 "bio" tokens appear as expected. Until then a reliable workaround is this same as for #67819. |
3.2.3 stable official
OS/device including version:
Windows 10 x64
Issue description:
I have a part in my code, where I want to execute a method on all nodes in a group. The method which includes the
call_group()
is initiated by a signal from one of the nodes in that group.In some special circumstance, which I'm not exactly certain about, the
call_group()
will call the method on all nodes except the node which sent the original signal.However, I can make the
call_group()
work with the following two workarounds:call_group()
tocall_group_flags(SceneTree.GROUP_CALL_UNIQUE, ...)
for node in cfc.get_tree().get_nodes_in_group("group_name"):
Both of the above will correctly execute on all nodes, including the one sending the signal. All other flags for
call_group_flags()
also fail to execute on the signaling node.This also works when I trigger the signal in a slightly different set of behaviours. Please see me reproduction info.
Steps to reproduce:
So, this is quite tricky to replicate in a minimal project as it seems to work normally, but I seem to have crafted a situation where I can make it appear only if I trigger the signal with a specific setup.
As I cannot craft a minimal product, I have instead created a branch in my repo which I have prepared so that this bug is immediately reproducible: https://github.com/db0/godot-card-game-framework/tree/GROUP_CALL_UNIQUE-bug
To reproduce:
GROUP_CALL_UNIQUE-bug
branchcall_group_flags()
flag, one viacall_group()
and one via the for loop.I have replicated this with simple prints as well, so it's not an issue with the "token adding" code. The
execute_scripts()
function is really not called at all on the trigger card. This way is just easier to see visually.The 6 group calls are defined in res://src/core/CFControl.gd Line 234
You can see that they all originate in the same spot and are called in the same manner. But for some reason, 4 out of 6 fail to execute on
Apologies for the complexity of this report, but I couldn't find a better way to report it.
The text was updated successfully, but these errors were encountered: