Hello again!
I am encountering an issue when trying to remove a child from a structure variable in GDevelop. Here’s a summary of the problem:
• Objective: I need to remove a child from a variable of type structure. There are 2 levels of children.
• Issue: When using the “Remove child from structure variable” action provided by GDevelop, the following happens:
- Numeric sub-children of the child I want to remove are deleted correctly.
- However, string sub-children of the child are converted to numeric sub-children with a value of 0 after removal.
I have also tried alternative methods, including:
• Using functions from the ArrayTools extension.
• Writing a custom JavaScript function for removal.
• I also tried removing the sub-children of the child I wanted to delete, and the behavior is the same: if the sub-child is of type Number, it is deleted. Otherwise, it is converted to type String with a value of 0.
In all cases, I encounter the same problem.
I have attached screenshots showing:
• The action I used.
• The structure before removal.
• The structure after removal.
Thank you very much for your help!
ADF