-
-
Notifications
You must be signed in to change notification settings - Fork 158
Closed
Labels
🐛 bugSomething isn't workingSomething isn't working
Description
Godot version: v4.2.1.stable.mono.official [b09f793f5]
Describe the bug
The weights for SelectorRandomComposite (and I assume SequencerRandomComposite) get reset to 1 after switching away and back to the node.
To Reproduce
Steps to reproduce the behavior:
- Create a new project
- Install the latest beehave plugin
- Create a Node3D
- Add BeehaveTree and Blackboard nodes
- Add a SelectorRandomComposite to the BeehaveTree node
- Add three ActionLeaf nodes to the SelectorRandomComposite node
- Check the Use Weight property on the SelectorRandomComposite and set the weight for the 3rd node to 10
- Create a Game node and add the Node3D node created above
- Check weights for SelectorRandomComposite and see they're all back to 1
- Reset 3rd weight to 10
- Switch back to Game node
- Switch back to Node3D and see they're all back to 1 again
Expected behavior
Setting weights in a RandomizedComposite should never reset unless changing the number of nodes.
Desktop (please complete the following information):
- OS: Windows
- Edition: Windows 11 Home
- Version: 23H2
- OS build: 22635.3447
Additional context
The issue might be in the RandomizedComposite root node when _on_child_exiting_tree is called. The child looks like it's being removed and the weights are being reset?
https://github.com/bitbrain/beehave/blob/godot-4.x/addons/beehave/nodes/composites/randomized_composite.gd#L127-L129
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🐛 bugSomething isn't workingSomething isn't working


