My way to calculate the win condition

After so many crashes and so many play back of the video, I think I found a more direct way to calculate the win condition:


First is the EndGame condition. Instead of the maze vibe coding in the video, my implementation is simply:

1.Go through all the existing controller in the world by TActorRange

2.Use the boolean IsPlayerWinner as the conidtion to judge

3.If IsPlayerWinner is true, then tell the GameHasEnded function true, player is the winner and keep the focus.

4.If IsPlayerWinner is false, then tell GameHasEnded function false, player is not the winner, detach the focus.



For the AI part, I think the most challenging part is how to calculate the existing AI in the world. This part is similar to the video.

2 Likes

Phenomenal job :tada:

Thanks for sharing! I just finished this part of the course and I appreciate this post a lot. Cheers!

Privacy & Terms