Wiki News Account creation no longer requires administrator approval - edits are still moderated, however.


From Zandronum Wiki
Jump to navigation Jump to search
Zandronum SkulltagOverlay.png Warning: This feature is Zandronum specific and may not supported by ZDoom and its other child ports!
Documentation may not be accurate, see ACS Functions.

bool SetPlayerClass (int player, str class, bool respawn)


Changes the class a player is currently using. Note that in order for this to work, the player must exist and not a true spectator, and the class must be a valid player class that isn't forbidden to the player (eg. the class is restricted to a team the player isn't on).


  • player: The number of the player whose class with be changed.
  • class: The name of the actor to change the player to. This must be a valid actor that inherits from ZDoom Icon 16x16.png PlayerPawn, or the string "random" to assign a random class.
  • respawn: If true, the player will immediately respawn with the new class, otherwise their class won't change until they respawn normally.

Return value

Returns true if the player's class was successfully changed, false on failure (eg. the player or class don't exist, or if choosing random classes is forbidden).


This article lists no examples, please add one.