Question on players statistics

Hello,

I am building a game where upon making certain decisions, player will get (-1) or (+1) to his/her sanity level (think of Don’t Starve). I realize that implementing such game mechanic is beyond my current knowledge, so for now I am satisfied with text messages. But I just can’t stop thinking about it. :smiley:

Is my assumption correct that in order to accumulate the player’s “choices” over the span of a game, we would need a new game object (“Player”) with a new script, which would sum up all the good/bad choices (predefined States) and provide result upon End game?

Regards,
Paweł

Hi PaFro,

Ideally, you would create a new class, for example, Player where you keep and manage the player’s stats. And in another class/instance, you would define the game rules based on values which you compare with the value in the Player object.

It’s not difficult. The only thing you do not know yet are constructors and how to reference normal C# objects. This is not covered in this course but it is fairly simple. After you read this article and the examples, you could, theoretically, implement your idea in your game with your knowledge at the end of this section.

Hi Nina,

Thank you so much for prompt response and for the articale. Something to crack on during upcoming week! :slight_smile:

Regards,
Paweł

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms