Classes:PlayerPawn
From ZDoom Wiki
Classes: PlayerPawn
→DoomPlayer
→ClericPlayer
→FighterPlayer
→HereticPlayer
→MagePlayer
→StrifePlayer
(more)
PlayerPawn is the base class for player actors. By inheriting from it you can create custom player classes.
Using in DECORATE
The PlayerPawn base class defines the following properties which are available to all inventory subclasses:
- player.attackzoffset value
- The height offset (in Doom map pixels) from the center of the player at which his attacks are fired. Scales according to crouched height.
- player.colorrange start end
- Defines the color range in which to translate the player's sprite.
- Default is no translation (0 0).
- player.crouchsprite sprite
- Defines the sprites for when your skin is crouching. If you don't define them your sprite will shrink half its vertical size to show it is crouching. For the crouch sprites you have to define all frames apart from the dying and gib frames.
- player.damagescreencolor string
- The colour the player's display turns when the player is in pain. This can be specified as three hex values for R, G, B respectively, or as a literal color name (e.g. "blue"). If this isn't defined, it defaults to red.
- player.displayname string
- This is the identification string of the player class. It is used in addplayerclass KEYCONF command, in playerclass console variable, in skin definitions, and in menus. Each player class used in game must have an unique display name!
- player.face string (development version only)
- This is the three-character prefix that will be used by the status bar face display built into DOOM and by custom status bars that define faces; note that with custom status bars in SBARINFO, faces can be used in all games (not just DOOM), provided the necessary graphics are supplied. This is like the face property of S_SKIN but for player classes. To include a status bar face you must put the 3 first letters of the sprite for the face here. For example, if one of the animations was BUGST00 you would put Face "BUG".
- When deciding which face to use, the engine checks for STF**** (DOOM games only), the SBARINFO face, the current player class face, the face of the currently loaded skin and finally the morphed animal player class face; whichever it finds last "wins".
- The engine also maintains faces across morphing; for example, if you were playing deathmatch in HeXen and have loaded an SBARINFO which defines faces for the fighter and also a DECORATE script containing a custom morph attack weapon that changes your enemy into a dog and includes dog face graphics; if you are turned into a dog, the status bar would change to show your face as a dog and turn back to a human again when you unmorph.
- player.forwardmove value [value-run]
- Speed modifier for forward/backward movement. The value is for walking and value-run is for running.
- Default is 1.
- Player.HealRadiusType string
- The nature of the healing effect the player offers to his allies in cooperative multiplayer when using a Mystic Ambit Incant.
- Value can be Health, Armor or Mana. Default is Health.
- The player's armor class values in Hexen. All values must be a multiple of five (they are divided by five when displayed on the HUD). Base value is the player class's minimum, all other values are the increases gained by picking up the corresponding Hexen armor item.
- Player.InvulnerabilityMode string
- The secondary effect an invulnerability powerup will have on the player, in addition to the invulnerability and display gimmick.
- Ghost will make the player phase in an out of ghost mode rapidly; Reflective will make the player reflect projectile attacks.
- Default is unnamed. To obtain the default effect, just make sure the line is not present.
- player.jumpz value
- The player's jump speed. The player's jump height in normal gravity is (value)²/2.
- Default is 8.
- player.maxhealth value
- Default is 100.
- The maximum health reachable by using normal health items.
- player.runhealth value
- The minimum health the player can have and still be able to run. (This is normally 10% for Strife)
- Default is 0.
- player.scoreicon sprite
- The icon visible next to the player's name on multiplayer scoreboard.
- player.sidemove value [value-run]
- Speed modifier for left/right movement. The value is for walking and value-run is for running.
- Default is 1.
- player.soundclass string
- The sound class used by SNDINFO's $playersound command.
- Default is "player".
- player.spawnclass spawnclass
- This is the filter for spawning things in a map. The spawnclass can be one of Any, Fighter, Cleric, Mage or a number between 1 and 16. 1 is synonymous with Fighter, 2 with Cleric and 3 with Mage. (development version only)
- player.startitem classname [amount]
- Adds an item to player's start inventory. First weapon added is the weapon selected at start.
- Note: The initial startitem list is never inherited and must be specified in full for each player class.
- player.viewheight value
- Specifies how high above the floor the player's eyes are.
- Default is 41.
- player.morphweapon weapon
- Sets the weapon the player will use when morphed to this class.

