Page MenuHomeFeedback Tracker

Add a callback function before engine applying any damage to alter how much damage is applied to an object
Assigned, UrgentPublic

Description

Hello,

Currently, it's not possible to easily alter the damage that any object taking.

It's possible to add a callback function from engine side, that can alter damage made on the object.

So something like this :

void HandleDamage(out TotalDamage damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)

With all functions inside TotalDamage class, so we can get and set all damages in each zone name.

So we can easily, for example, alter every damage from PVP, we just need to check if the source is a player if it is, we set all damage to 0, so it's will not give any damage to the current player.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline

NiiRoZz created this task.May 16 2020, 11:19 AM
Stix90 added a subscriber: Stix90.May 16 2020, 2:39 PM
Arkali added a subscriber: Arkali.May 16 2020, 4:21 PM
Jest added a subscriber: Jest.May 16 2020, 5:36 PM
Unknown Object (User) added a subscriber: Unknown Object (User).May 17 2020, 8:11 PM
Geez changed the task status from New to Assigned.May 18 2020, 12:56 PM
Lex added a subscriber: Lex.May 18 2020, 3:00 PM
komer added a subscriber: komer.May 23 2020, 8:04 PM
nigel added a subscriber: nigel.May 28 2020, 1:47 PM
mdc added a subscriber: mdc.Sep 5 2020, 8:41 PM
komer added a comment.Sep 20 2021, 7:23 PM

So much time has passed, and the developers cannot add at least some useful function, the models edit which ones or create updates, where they changed 1 line of localization.
for all the time have not added 1 useful function.

stupidly damn it, they close the tickets that they did everything, but in fact they didn’t do it.

@komer ... except they just added that to class Object ...

	/**
  	\brief Event called from C++ right before damage is applied
		@return whether to apply the damage or not
	*/
	bool EEOnDamageCalculated(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		return true;
	}

i wish they would have posted here about it too :D just tested it and it seems to work well so far

komer added a comment.Sep 22 2021, 6:22 PM

@Arkensor,
Well, finally, we added a command, so much time has passed, thanks for the information that we have added this command.