So I have a very simple flow so far in a prototype. Currently I have a health system that destroys the enemy actor when health hits 0. Well I want to spawn a coin on death. Well actually I want to spawn a random number of coins.
I have all the blueprints made but when I try to spawn the coin at the point I destroy the enemy actor it crashes the engine.
This particular spawn if for a spawn actor class. The emitter in the current blueprint is for the explosions particles. When I spawn actor class it crashes.
Where are you spawning the actor exactly then? I assumed it was the particle but in any case, try detaching the spawned actor before destroying the BP.
Are you referencing this actor via Cast or interface anywhere else? If not does it still crash if you destroy the actor without spawning another actor? Does it crash if you destroy the actor elsewhere?
It looks like you have it setup to get the transform of the projectile and spawn coins there. I’d imagine that the projectile is destroyed on contact with the enemy. If so, you’re trying to get the transform of an actor that doesn’t exist, this might be this problem. An easy fix would be to spawn at “self” rather that the projectile.