0 votes

I've been trying to make a QTE system that has nodes representing each type of button interactions (holding the button down, pressing, tapping, etc) which can all behave very differently. These are strung into a sequence inside a "Action" class.

The action class is used for the player to pick their attack, so the action class needs to remain intact through the process.

Right now, when I pass the list of QTE button interactions to the button handler, it deletes the button interactions from the action class, which I don't want. .duplicate() does create new nodes, but the member variables including the buttons I want pressed are not copied over.

I can't just straight go through each member in order, directly copying values since different button interactions have different members.

Is there a way to copy instanced nodes along with their members? I seem to think this would come up a lot, as generally when you make an item in games you copy the item rather than completely remake it from scratch.

Thanks in advance.

in Engine by (24 points)

I think it could be a bug.

Yeah, I saw that, but I want to know how people get around it. I feel like someone has to have done something similar.

If you don't have so many properties, you could copy them manually in script.

I guess for now I'll have to do that. I'll try and minimize differences, and maybe come up with a way to treat them all similarly.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.