Greetings!
I’m fairly new to GS and am enjoying it!
Question:
I want to display a stat to the player letting them know what percentage of games they’ve won.
I’ve set up a real game attribute that adds 1 each time they win the game. (Win)
I’ve set up a second real game attribute that adds 1 for each time they play the game (Total)
I’m trying to use a display text behavior to display the average the player has won.
I’ve done: (Win/Total) *100
This works, but only once the player has lost a game. At which, point it begins to correctly display the percentage of games won. Before that, when no games have been lost, it only displays “nan.”
I’m not sure why this is, as it should be displaying 100. (For example, if the player has played and won 5 games, the calculation would be (Win 5/Total 5) *100=100. It should display 100, but does not.
Any thoughts?
Thanks so much!