Download

How do i set up a win state like this?

Hi i need help setting up a win state for a tower defense game i am working on.

Using the level blueprint ive made a sequence of spawn actor from class’s.
Is there any way that the level can detect that all the enemies in that level have been killed/destroyed and then create a widget blueprint to indicate that?

Thanks.

The node get all actors from class, which should output an array. If array length = 0 then all enemies are dead.

Thank you for a very informative response and i apologise for my delayed reply, however i have tried this and for some reason it is having no effect.
Bare in mind that with the nature of this tower defense game i am working on, gameplay starts with no enemies active in the environment they are spawned in after a set time. So I have set up what you told me to do using a delay to prevent the win state being activated at the start of the match when there are no enemies spawned.

Below is a screenshot of how i’ve set up the enemy spawning in the level blueprint:

d90a37e501ce9df75fc24b202907803f4c807b59.png

Below is a screenshot of how i’ve attempted to set up the player’s winstate in the level blueprint with a quit game node being the result for now for debugging purposes:

Ignore the above response, everything is now resolved. Thank you very much! :slight_smile: