Im trying to spawn a actor (CigsBox) from inside the AI character blueprint. Everything looks correct, but the actor never spawns.
The problem is that you destroying your AI before it gets the chance to spawn the actor, instead you can set your actor to hidden, disable it’s collision, delay, spawn you actor, then use the destroy function
still no good
try putting a delay before the destroy actor
Maybe you are spawning an actor at the wrong location. Let’s isolate your code, just try to make your actor spawn another actor, no destroy function or any other function. Does it work?
Ok, but the other functions were working before? it’s just the spawn then that is not working. Are you sure of the spawn location? Can you set it to a static value, like a place that you know on screen?
no, if i disable all other functions so the on any damage event only spawns the actor, it still does not spawn.
The spawn transformer is set to “Arrow1” which is a component of the actor that is right above the actor, to insure that the actor isnt breaking if its hitting the actor i put the arrow a good amount above the actor (for trouble shooting only)
instead of using on event anydamage, can you connect it to event right mouse click? I just want to see if the issue is from the spawn or the event is not being called properly
This is so weird. Add a print string function after the spawn, and from the return value of the spawn function, get the actor location and print it. What do you get?
it means that you are destroying you actor from your crackheadBP, there is a destroy actor somewhere that you have missed
The problem is that your box is overlapping with your actor the minute it spawns. so maybe spawn it a little further away from the player?
This is strange, it should not destroy unless it overlaps with the player. Did you connect the destroy actor after the cast?
the character BP is derived from a parent BP
here is the graph for the parent and the ai character
ive deleted all destroy actors in both and deleted the on any damage in the parent, still gives me the same error