Hi! I’m working on a grappling system and it’s almost done but I have 1 problem… The grapple point and the grappling line can’t be destroyed. I don’t know if I have to set something else for the actors to be destroyed when touching the grapple target or something else. Hope someone can answer. I’m leaving the part of the blueprint I think is having the issue. Thanks!
Hey there @GrandmasterPanch! Much of the time when this happens it may be due to the references for the variables not being set (or changing before the time they are called to be destroyed). To get a quick check of that, do a quick valid check and print of that variable where your destroy is and see if it is valid. If it is the correct actor, then it may not be garbage collected appropriately. Some particle systems (like cascades) do have some garbage collection quirks if you were using that for your rope system.
Tried using the Valid Check. It was my first time using it, and I whink it worked… In a way. It did show me the Valid and Not Valid text and my objects (hook and line) were destroyed after some seconds (or maybe by pressing F on the keyboard), but I would not return to my other states.
I also tried using a sequence to validate both destructions. Is that alright or should I try other way to use the Valid check in the way I have the blueprints?
Yep, the valid checks are just a failsafe to be able to know if you’re calling out to destroy a null reference or not. If it is the correct reference, the actor in question should be destroyed.
After you set the state back to retracted, the enum should definitely change since you set it directly there. Pop a print behind it to print the current state, and set a breakpoint on it. If it doesn’t set the state something is really busted. It’s more likely that the logic the statr relies on doesn’t check again immediately or that the retracted state isn’t immediate (ie if they tried to shoot another while one was traveling, is that edge case covered?).
Hi! Sorry for answering 2 days later. I’ve been working on the grappling problem and I finally found what was wrong! I have a Variable/Constant that gave the character an “ending jump”; the value wasn’t big enough (I set it to 100) and that was blocking my character to finish the movement. Also, the offset of the grapple point wasn’t helping haha I had to move it a little.
Thanks for the help! It helped me a lot