SetPlayerScore: Difference between revisions
(Added page for SetPlayerScore.) |
DrinkyBird (talk | contribs) (Accidentally deleted ''value'') Tag: Source edit |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ACSWarning}} | {{ACSWarning}} | ||
int '''SetPlayerScore''' (int ''player'', int ''type'', int ''value'') | int '''SetPlayerScore''' (int ''player'', int ''type'', int ''value'') | ||
==Usage== | == 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. | 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== | === Parameters === | ||
*player: The number of the player whose score | * ''player'': The number of the player whose score to change. | ||
*type: | * ''type'': One of: | ||
:*'''SCORE_FRAGS''' = 0 | |||
::How many frags this player has. | |||
:*'''SCORE_POINTS''' = 1 | |||
::How many points this player has. | |||
:*'''SCORE_WINS''' = 2 | |||
::How many wins this player has. | |||
:*'''SCORE_DEATHS''' = 3 | |||
*value: The new value | ::How many times this player died. | ||
:*'''SCORE_KILLS''' = 4 | |||
::The number of monsters this player has killed. | |||
:*'''SCORE_ITEMS''' = 5 | |||
::The number of items this player has picked up. | |||
:*'''SCORE_SECRETS''' = 6 | |||
::The number of secrets this player has found. | |||
* ''value'': The new value of the score. | |||
==Return | === 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). | 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). | ||
[[ | == Examples == | ||
{{noexamples}} | |||
== See also == | |||
* [[GetPlayerScore]] | |||
[[Category:ACS functions]] |
Latest revision as of 01:06, 3 July 2022
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)
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 to change.
- type: One of:
- SCORE_FRAGS = 0
- How many frags this player has.
- SCORE_POINTS = 1
- How many points this player has.
- SCORE_WINS = 2
- How many wins this player has.
- SCORE_DEATHS = 3
- How many times this player died.
- SCORE_KILLS = 4
- The number of monsters this player has killed.
- SCORE_ITEMS = 5
- The number of items this player has picked up.
- SCORE_SECRETS = 6
- The number of secrets this player has found.
- value: The new value of 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).
Examples
This article lists no examples, please add one. |