Download

How to play Death Animation whenever the enemies Health is 0? (In Blueprints or C++ and spawn again with the AI Controller)

It’s showing this, in my Debug for BP_Spawner.
image

Breakpoint:

Debug Tab:
image

But is it stopping in the breakpoint or not?

How do you know whether it’s stopping or no?

The execution will stop and that blueprint will show up. Is the string “spawn activated” being shown?

Show me the full blueprint where you are calling that Spawn event.

The Spawn Activated Print String is not shown + the Spawning Print String in BP_Enemy is not shown.

Dude… I look at what you’re doing and it makes me think I’ve learned a lot more UE4 than I thought.

I can absolutely help you, but im not. You obviously aren’t actually watching the tutorials and taking in the information. UE4 is not a walk in the park: after 7 months of it, I can do maybe 10% of things in the engine, and all those are relatively basic. (Though I guess I am almost done with my game Two Guns Two Goals) I still follow tutorials, ESPECIALLY for AI, but I always try to understand WHY things work the way they do. If you’re too preoccupied with getting something running (this may be the pot calling the kettle black but) then you will never learn this engine. You have to actually learn it. Just having the code doesn’t teach you what it is. Ryan Laley, Matthew Wadstein. Those two people can answer probably every question a beginner and even intermediate would ask. Look them up on YouTube if you DO want to learn the engine. If not, just stop wasting your time with UE4 and go play Valorant or something, low key.

Dude what I’m literally right

Hey guys!

Make sure we’re being civil in the forums and encouraging other Unreal Engine community members. Our code of conduct is a great place to start to learn whats expected while on the forums.

Thanks!

1 Like

So, if the strings are not shown, obviously the enemy will not spawn.
Place a single enemy on the map, and right at the beginning of the tick event use print string to print the enemy health and confirm that it reaches zero.

I placed a single enemy on the map and the enemy health is going to 0.
image

Place a breakpoint there and run the game.
After the “branch health <= 0.” or else it will always stop.
image
Here, on the first “Delay”.

Okay so when I was in the PIE session. It just stopped the moment I shot that particular enemy.
image

You should have something like this:

image

Now, “Step Into” and check where the execution is going.

image

Do you reach Spawn?
image

Didn’t you tell me to add the breakpoint on Delay? Anyways I did it like you asked too but it didn’t reach spawn.

Now, check where it reached and try to understand why it didn’t reach spawn. Cmon man, do a little troubleshoot…

Okay I figured it out, Enemies are now spawning with no issues. Thank you so much for your help!

1 Like