SetPlayerClass: Difference between revisions
m
no edit summary
No edit summary |
mNo edit summary |
||
Line 7: | Line 7: | ||
==Parameters== | ==Parameters== | ||
*player: The number of the player to change their class. | *player: The number of the player to change their class. | ||
*class: The name of the actor to change the player to. This must be a valid actor that inherits from APlayerPawn. | *class: The name of the actor to change the player to. This must be a valid actor that inherits from APlayerPawn, or can be "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. | *respawn: If true, the player will immediately respawn with the new class, otherwise their class won't change until they respawn normally. | ||
==Return Value== | ==Return Value== | ||
Returns 1 if the player's class was successfully changed, 0 on failure (eg. the player or class don't exist). | Returns 1 if the player's class was successfully changed, 0 on failure (eg. the player or class don't exist, or if choosing random classes is forbidden). | ||
[[category:ACS Functions]] | [[category:ACS Functions]] |