Is pending kill by function?
Hi I want to set a box rotating that when player steps on dissapears and make you goin on to the next level.
It works but my set up tells me that I have a blueprint error and is this:
this is my set up:
Can you please post an image tutorial of what I have to do in order to remove that error?
Thank you so much this looks simple but I can't find a clue of what I have to do...
asked Oct 13 '17 at 06:01 AM in Blueprint Scripting
Hi there. In the image that you've shown, at the moment you're only destroying the component (the variable Static Mesh). When your update/tick function runs, it expects for the Static Mesh variable to still be alive. When you use the "Destroy Component" function, you're only killing the Static Mesh variable. The DestroyComponent function destroys a component of the actor; not the actor itself. This means that the actor will still run it's functionality such as the Event Tick. The next time the actor ticks, it will call the AddRelativeRotation function on the Static Mesh variable which is now either pending kill or dead; this is why the error is occurring.
If you want to destroy the actor when the player collides with the box, you will need to use the DestroyActor function. This destroys the actor completely. This way, the tick event won't occur and these errors shouldn't occur.
answered Oct 13 '17 at 06:24 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here