Player Death Animation #6

Open
opened 2024-10-01 23:43:29 +00:00 by OddlyTimbot · 1 comment
Owner

There are a few issues with implementing the player death animation.
Make the player show a death animation when their health passes below zero.
Affects:

  • game_congtroller.gd
  • player.gd
  • scene_manager.gd

For a simpler implementation, use a timer to delay reloading the scene when the player dies.

There are a few issues with implementing the player death animation. Make the player show a death animation when their health passes below zero. Affects: - game_congtroller.gd - player.gd - scene_manager.gd For a simpler implementation, use a timer to delay reloading the scene when the player dies.
Author
Owner

In the game_controller, check to see if the player's health is over zero before attempting to decrease the health. We should stop decreasing it if the player is already in the dying state.

In the scene_manager, only attempt to start the timer if it is not already running! If timer.start is called it resets the timer. This is a problem when the slime keeps hitting the player (who is down).

In the player script, create a simple boolean to track if the player is alive. If the player is NOT alive, everything (controls, shooting, moving, etc.) should all be disabled. This prevents the player from taking action while the dying animation happens.

In the game_controller, check to see if the player's health is over zero before attempting to decrease the health. We should stop decreasing it if the player is already in the dying state. In the scene_manager, only attempt to start the timer if it is not already running! If timer.start is called it resets the timer. This is a problem when the slime keeps hitting the player (who is down). In the player script, create a simple boolean to track if the player is alive. If the player is NOT alive, everything (controls, shooting, moving, etc.) should all be disabled. This prevents the player from taking action while the dying animation happens.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: OddlyTimbot/AugGodotGameCourse#6
No description provided.