[SOLVED] Add a child to an array doesn't work

What I’m trying to do is make it so that if the character name (DialogueTree::CommandParameter(0)) is not in the array it gets added while spawning the character.
Everything else works, but for some reasons the name doesn’t get added to the array.
Can someone help me?

Have you tried adding it without the condition that checks if it exists? Might help problem solve?

Can you log DialogueTree::CommandParameter(0) in the console and check the result.

Extra: alternatively you can try adding the text Actors.ObjectName() instead

1 Like

that would make the character spawn even if there is one already

I’ve tried and it’s correct, otherwise the object wouldn’t be created.
and putting Actors.ObjectName() also doesn’t work
I ever tried to change it like this:

Maybe because the condition is saying add the text only if it isn’t there it doesn’t execute because adding the name would violate the condition? Try setting a separate variable instead and use that to trigger the name add in a separate event? Just guessing here…

I’ve managed to solve it
for some reason the game was also running the command to remove a character.