[0.17.79] get_associated_characters() returns empty table on new game with character
Posted: Mon Dec 23, 2019 10:12 am
I was testing unrelated things with console commands in a new single player game, and using
returns an empty table, but
returns my character.
I don't know if that's intentional behavior or not, that the starting character is not "associated". Honestly I'm not sure what being associated means if this is expected behavior. I got the impression a player "owned" characters, and may be assigned multiple, so they could switch them without searching/keeping track of the individual character entities. In that sense, I'd expect the starting character to be associated.
Example command:
prints 0
prints character
(searched forum but didn't find much of anything on the topic, and not this particular example)
Code: Select all
game.players[1].get_associated_characters()
Code: Select all
game.players[1].character
I don't know if that's intentional behavior or not, that the starting character is not "associated". Honestly I'm not sure what being associated means if this is expected behavior. I got the impression a player "owned" characters, and may be assigned multiple, so they could switch them without searching/keeping track of the individual character entities. In that sense, I'd expect the starting character to be associated.
Example command:
Code: Select all
/c game.print(#game.players[1].get_associated_characters())
Code: Select all
/c game.print(game.players[1].character.name)
(searched forum but didn't find much of anything on the topic, and not this particular example)