My memory is hazy but I believe IObject.GetHealth() used to return the corpse object's health after the player dies. At this moment, IObject.GetHealth() only returns the player's PlayerModifier.CurrentHealth property, so if the player is dead it always returns zero.
IObject.SetHealth() has no effect on corpse objects either.
This makes it impossible to interact with the health of a corpse object as a result.
If this is by design then take it as a suggestion to add the functionality necessary to be able to interact with corpse objects.
This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
Corpse health is unreadable (api problem)
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: 25
- Gurt
- Lead Programmer

- Posts: 1887
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 36
You can't revive dead players and dead players should return 0 health.
The GetHealth and SetHealth is IObject interfaces and the IPlayer overrides these as you're not allowed to set health directly however you want if the player is dead. The proper way to "revive" a player is to create a new IPlayer instance with the same skin.
Adding IPlayer.GetCorpseHealth(), SetCorpseHealth(float value), GetCorpseMaxHealth() to the next update (after v.1.3.5).
Gets/Sets the player's corpse health. This health starts counting once the player is dead.
Once this reaches 0 and the player takes additional damage, the player will be gibbed.
The GetHealth and SetHealth is IObject interfaces and the IPlayer overrides these as you're not allowed to set health directly however you want if the player is dead. The proper way to "revive" a player is to create a new IPlayer instance with the same skin.
Adding IPlayer.GetCorpseHealth(), SetCorpseHealth(float value), GetCorpseMaxHealth() to the next update (after v.1.3.5).
Gets/Sets the player's corpse health. This health starts counting once the player is dead.
Once this reaches 0 and the player takes additional damage, the player will be gibbed.
1 x
Gurt