However, upon destroyed actor and delay, I should be able to spawn AI from Class and reference it to the same location/sprite… and I’m lost at sea here
Could the BehaviorTree be the problem? Because I am able to respawn the AI on destroy if I set a fixed location on the XYZ axis without referencing it to a Target Point and using custom roam/chase events in that same Blueprint. But no BT makes it look crappy and unnatural and I would have to set locations for every character on every level which is INSANE. There has to be a better way…
N.B.: I did the UE4 “Bind/Assign Event to OnDestroy” Tutorial and it’s just not working either…
I’m still new to ue so sorry if i’m wrong. You have a destroy actor node and after that the spawn. I don’t think the execution reaches the spawn since you’re calling destroy, right?
It does make sense.
But then again… the actor is destroyed so I’m recalling a brand new actor from the same location.
Its the only way I figured how to make it loop. And Im able to, only if I manually set location and reference it to nothing. Just some random location from thin air. Hence why I’m wondering if my location reference is the problem or i’m just doing it completely wrong.
I would say that you’re both correct. Calling the Spawn Actor after the Destroy Actor is your first issue. As far as your Target Point, try using Print String to check that the Target Points location is not (0,0,0). If it is, there’s something wrong with your variable.
The location seems to be fine. The variable is a reference to TargetPoint actor.
It looks like I’m stuck between two non-working solutions.
Now I can make the NPC respawn on the Target Point if I place the NPC directly into the level, right-click on the character and add an OnDestroyed event into the Level Blueprint.
From my experience, I try to avoid using the Level Blueprint whenever possible unless it’s for cosmetic reasons for the level. This is because there is no proper way to communicate with it from other blueprints. I also try to avoid directly spawning pawns from another pawn, especially when the spawner is on the verge of being destroyed.
I personally do most of my spawning from the game mode, mainly because it can be accessed from any blueprint using Get Game Mode and casting to it. I’ll try to post some screenshots later if you’re still having issues.