Page MenuHomeFeedback Tracker

OnCommandDeathStart and OnCommandDeathFinish issues
Reviewed, UrgentPublic

Description

Two issues found with the these death commands.

  1. Human.OnCommandDeathStart seems to only fire once the players health reaches 0, if the player commits suicide the event doesn't fire.
  2. Human.OnCommandDeathFinish doesn't even fire, from the current game codebase its not used so I suspect its not even linked up?

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Simple testing:

modded class PlayerBase
{
	override void OnCommandDeathStart()
	{
		super.OnCommandDeathStart();
		Print("Command Death Start");
	}
	
	override void OnCommandDeathFinish()
	{
		super.OnCommandDeathFinish();
		Print("Command Death Finish");
	}
}

Then go and kill yourself through various means.

Event Timeline

CptCookie created this task.Dec 3 2023, 7:59 PM
Geez changed the task status from New to Assigned.Dec 4 2023, 10:18 AM
Geez changed the task status from Assigned to Reviewed.Dec 4 2023, 1:43 PM
Geez added a subscriber: Geez.

Hello CptCookie.
This is intended, those functions relate to HumanCommandDeath.

  1. 'HumanCommandDeath.OnCommandDeathStart' will only be called when the command starts. 'HumanCommandDeath.OnCommandDeathFinish' will never be called as a player can never stop being dead.
  2. A suiciding player does not use HumanCommandDeath and instead is performed as an action with 'HumanCommandActionCallback'.

Maybe you are looking for the 'EEKilled' event that you can override and use on players?