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.
IPlayer.DealDamage(float damage, DamageType type)
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- Danger Ross
- Superfighter
- Posts: 154
- Joined: Thu Mar 31, 2016 12:56 am
- Title: Dangerous
- SFD Alias: Danger Ross
- Started SFD: 14 june 2012 (launch day)
- Location: California
- Gender:
- Age: 23
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
Adding IPlayer.DealDamage(float damage) after v.1.3.4. It will only contribute to the TotalOtherDamageTaken but will follow all the internal rules for dealing damage to a player.
0 x
Gurt