![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | johnnywycliffe |
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.
I think it could be a bug.
Dlean Jeans | 2019-06-30 13:59
Yeah, I saw that, but I want to know how people get around it. I feel like someone has to have done something similar.
johnnywycliffe | 2019-06-30 14:33
If you don’t have so many properties, you could copy them manually in script.
Dlean Jeans | 2019-06-30 14:48
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.
johnnywycliffe | 2019-06-30 18:21