IPlayer.DealDamage(float damage, DamageType type)
Posted: Sun Mar 22, 2020 4:49 am
I've been able to work around the fact that I can't make artificial damage (damage done through script) by setting the players health to some amount below their current health, but after the strength boost was added with its unique "boost health" mechanic, I realized there's some limitations to this method. There's no way to deal artificial damage to someone who only has boost health left since there's no method of interacting with it. Also, the workaround doesn't allow me to keep track of damage statistics as easily.
I propose a script-friendly method that allows the user to deal damage to players artificially in a very simple layout. Let's call this method "DealDamage"
the first parameter "damage" (float type) would indicate the amount of health to be subtracted from the player's current health, as well as an amount to be added to the player's statistics. The property that would be modified in statistics may depend on the DamageType, but by default it should at least add to IPlayerStatistics.TotalOtherDamageTaken and IPlayerStatistics.TotalDamageTaken.
The DamageType enum would indicate which playermodifier will alter the effect of the inputted damage value, as well as which player statistics will be modified.
If it's not possible to add a method like this, then at least consider making it possible to alter IPlayerStatistics properties and changing BoostHealth.
I propose a script-friendly method that allows the user to deal damage to players artificially in a very simple layout. Let's call this method "DealDamage"
the first parameter "damage" (float type) would indicate the amount of health to be subtracted from the player's current health, as well as an amount to be added to the player's statistics. The property that would be modified in statistics may depend on the DamageType, but by default it should at least add to IPlayerStatistics.TotalOtherDamageTaken and IPlayerStatistics.TotalDamageTaken.
The DamageType enum would indicate which playermodifier will alter the effect of the inputted damage value, as well as which player statistics will be modified.
If it's not possible to add a method like this, then at least consider making it possible to alter IPlayerStatistics properties and changing BoostHealth.