Player class
Part of Karma
Summary
Methods
GetKarma()shared
Returns the player's karma, from -100 to 100.
GetKarmaLevel()shared
Returns the language phrase of the karma level the player's karma falls into.
SetKarma(karma)shared
Sets the player's karma, rounded and clamped to -100 to 100, and saves and networks it.
Methods
Returns the player's karma, from -100 to 100.
Reads the karma character data and falls back to the networked karma variable, so it also
works on the client.
Returns
- Number The player's karma
See also
Returns the language phrase of the karma level the player's karma falls into.
The result is cached on the player until their karma changes.
Returns
- String Phrase such as
#Karma_Neutral, or#Karma_Errorwhen no level matches
See also
Sets the player's karma, rounded and clamped to -100 to 100, and saves and networks it.
Fades the player's screen red when karma goes down and blue otherwise. Server only, since it
uses ScreenFade and SetCharacterData. Does nothing when karma is not a number.
Parameters
- karma Number The new karma value