Degree Project Game Progress #4

This my death-screen for when Player's incur a Death-state by the Health Value being 0.


This is my current Pause Screen.


These nodes are just so the script can reference the widget, which are contained in their own blueprint for 2D UI but must be referenced by the Player

This is just the code to bring up the pause menu. To do that is creates the widget for the menu, sets the controls so the player can only move the mouse and freezes the game world

This set of nodes for checking the death state of the player and keeping track of the player health.
Here is a Step-by-step of what code it executes:
  • The first node checks for any types of damage applied from the "Apply Damage" Node in other Actors that applies to the Player

  • It then subtracts the amount of damage from the player's current health which becomes the set health float (Clamped between the 0 and the MaxHealth Variable) 

  • This set health is the referenced by the Health Bar which is allowed to be called in and referenced in the player construction graph thanks to the "Construct health Bar BP" being present. The bar now matches the value of the player's current health

  • There is then a branch which decides if the player is still alive or will go to the death-screen with the "True" value being if the player's health is at 0

  • If it is true, this sets the Boolean 'IsDead' to True, which disables the player input, creates and render's the death-screen, pauses the Worldspace of the Game and enables the mouse for menu navigation. This final step may change later in development as I am considering removing the death-screen and just having the player instantly respawn at the checkpoint if they die for the sake of level-flow and making checkpoints more accessible because the death-screen, as ofr now, restarts the level entirely if you press it, which  I don't really want to keep.










 

Comments

Popular posts from this blog

Degree Project Digital Media Analysis

Professional Practices 4

Degree Project: Gameplay Test Footage