Found this issue when looking for a god mode method.
Description
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
Call character.GetDamageManager().EnableDamageHandling(false) on a character entity in game.
Shoot that character in the head.
The character will die.
I'm expecting this function, when called on the server, to enable/disable damage on a character. This doesn't seem to be the case as characters can still die when their damage handling is disabled.
Event Timeline
New info:
My original test setup was the following:
World editor -> Play Button Dropdown -> "Server Localhost + Peertool" -> Play
I only have one peer setup, so another game instance is launched.
I would take my in editor character and put him into a zone that gives him "godmode" via the server calling "character.GetDamageManager().EnableDamageHandling(false)"
I would take the game instance character and kill him, which succeeds.
I just tested again but with two peers.
That function will protect those peers from dying from any damage and from any other peer.
But... It doesn't protect the player who is in playing out of the world editor.
As I don't believe info has been released about how the client server arch is working in editor I can only speculate that the client playing in editor is also the server and that is why the behaviour is different.
Mystery solved!
I spoke to Jokin on the discord (has a BI dev tag) and they mentioned that this is because the editor's cheat menu is constantly overwriting that value.
So it is known why this behavior exists, but the behavior is not ideal.