How to set all actors (enemies) health back to max if player dies and respawns from checkpoint location?

Hi there, I’m trying to figure out a way to set all the enemies in the level’s health back to max is the player respanws- although I’m stumped…

I tried this but it didn’t work :skull: :

I’m sure it’ll probably be a simple fix- I’ve just got no clue how to do it-

The respawn is a custom event in the player so THAT event needs to reset the all the enemies still alive in the level’s health to max-

Any ideas/ suggestions would be greatly appreciated! :raising_hands:

There are a few options here.

You could destroy them all and respawn them. You can either get their current locations and spawn them there, or get their default locations through use of a variable and interface.

You can also just use an interface call to set their health. I wouldn’t recommend this one as it doesn’t reset their AI unless you tell it to, in which case that’s just more work.

And then you could reload the level entirely. It would reset everything in the level, but if you save it then that shouldn’t be a problem, as you’ll want players to be able to log off without resetting everything anyways.

1 Like

Hi Wilko,

My first thought is that you need to run the logic for each class in that ‘Out Actors’ array with a ForEach Node.

2 Likes

Thanks guys!! I’ll try these out tomorrow, appreciate it!:raising_hands:t3:

1 Like