SetPlayerScore

From Zandronum Wiki
Revision as of 16:17, 27 September 2021 by AKMDM (talk | contribs) (Added page for SetPlayerScore.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

int SetPlayerScore (int player, int type, int value) (development version 3.1-alpha and above only)

Usage

Changes the score of a player. The type of score to be changed can be many things, whether it's their frag count, how many monsters they killed, how many times they died, etc.

Parameters

  • player: The number of the player whose score we'd like to change.
  • type: Can be one of the following:
    • SCORE_FRAGS = 0, the player's frag count.
    • SCORE_POINTS = 1, the player's point count.
    • SCORE_WINS = 2, the player's win count.
    • SCORE_DEATHS = 3, how many times this player died.
    • SCORE_KILLS = 4, the number of monsters this player killed.
    • SCORE_ITEMS = 5, the number of items this player picked up.
    • SCORE_SECRETS = 6, the number of secrets this player found.
  • value: The new value we'd like to set for the score.

Return Value

Returns 1 if the player's score was successfully changed, 0 on failure (e.g. the player doesn't exist or an invalid type was passed).