Unable to destroy actor
So I have this simple script:
The array contains actors; The actors are all from the same (blueprint) class. It's just a few in the scene.
The blueprint class is called Blueprint_CellWall. The array is set to be editable, and exposed on spawn, so I set its contents from withing the editor window. Here's another pic from the editor:
Does anyone know why I can't manipulate it? If I print out their locations, it does it correctly...
I also get an error when I replace the destroy actor with a move actor node:
I reproduced your error. Gotta be honest, I'm not 100% sure why it wasn't deleting, but I tried a different approach and got it to work. First, forLoops keep shooting even if the first iteration hit a delay or timeline, so you probably don't want that. Because a timeline can be used like a tick event that you can turn on and off, just keep checking the length of your array to see if it is 0. If it is, stop the looping timeline. (I put a delay on mine, I don't know if you wanted a pause in between each one or not)
Make sure you remove the index of whatever you had just deleted. If you don't it will only delete one and loop forever.
I was only using M pressed for testing.
answered Feb 23 '15 at 02:19 PM
The best way to troubleshoot your issue would be to use "Breakpoints" to find what part of the code is firing and what isn't. What I would do is attach a "Print String" to the "Is Not Valid" to see if that's being fired.
I also notice that your "DoOnce" isn't resetting, so it's literally only ever firing once, But I haven't had much experience with the "DoOnce" node.
Check out this documentation: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Debugging/index.html to find out where your code is firing.
answered Feb 22 '15 at 07:38 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here