[0.17.58] corpse player_index is 1 higher after creation of corpse
Posted: Sun Jul 21, 2019 7:45 pm
The following code should create a corpse with the player index of 1, but the resulting corpse has player index 2
If I want to create a corpse for the local player, then I need to do `player_index = game.player.index - 1`.
This seems illogical to me.
Code: Select all
/c local c = game.player.surface.create_entity{name = "character-corpse", position = game.player.character.position, force = game.player.force, inventory_size = 0, player_index = 1}; game.print(c.character_corpse_player_index)
This seems illogical to me.