User:Jekyll Grim Payne/ZScript Actor Fields

From ZDoom Wiki
Jump to navigation Jump to search
Note: This list is a work-in-progress. You can help by adding to it.

General fields

Name Data type Related actor properties Description How to read How to modify
Player PlayerInfo None A pointer to an instance of the PlayerInfo struct (if there is one). Normally is only non-null on PlayerPawn actors. Readable directly Not modifiable outside of morphing
Prev vector3 None Holds the actor's position as it was during the previous game tic.
When actors move, their actual position is interpolated between Prev and pos.
Readable directly Readonly
ThruBits uint ThruBits See ThruBits. Readable directly (Need more info)
SpriteOffset vector2 None The current offsets of the currently used sprite. Readable directly Modifiable directly
A_SpriteOffset
WorldOffset vector3 None Positional offset relative pos. Readable directly Modifiable directly
spriteAngle double SpriteAngle See SpriteAngle. Is only effective when using the SPRITEANGLE flag. Readable directly
GetSpriteAngle
Modifiable directly
A_SetSpriteAngle
spriteRotation SpriteRotation SpriteRotation See SpriteRotation. Readable directly
GetSpriteRotation
Modifiable directly
VisibleStartAngle float VisibleAngles See VisibleAngles. Readable directly Modifiable directly
VisibleEndAngle float VisibleAngles See VisibleAngles. Readable directly Modifiable directly
VisibleStartPitch float VisiblePitch See VisiblePitch. Readable directly Modifiable directly
VisibleEndPitch float VisiblePitch See VisiblePitch. Readable directly Modifiable directly
Angle double None The actor's current absolute facing angle.
Normally 0-360, but can go beyond this range for PlayerPawn.
Readable directly Modifiable directly
A_SetAngle
Pitch double None The actor's current pitch from -90 (up) to 90 (down). Readable directly Modifiable directly
A_SetPitch
Roll double None The actor's current roll in a [0, 360] range.
For actor sprites to follow the roll, the ROLLSPRITE flag must be used.
For 3D models to have effect, the model will need the USEACTORROLL in MODELDEF.
Readable directly Modifiable directly
A_SetRoll
Vel vector3 None The actor's current absolute velocity. Readable directly Modifiable directly
Speed double Speed The actor's Speed property.
Note, this is not the current velocity.
Modifying Speed will have no effect on the speed of the actor's current movement.
For that, you need to modify vel.
Readable directly Modifiable directly
A_SetSpeed
FloatSpeed double Floatspeed See Floatspeed. Readable directly Modifiable directly
A_SetFloatSpeed
Height double Height The actor's Height. Can be modified dynamically. Readable directly Modifiable directly
A_SetSize
sprite SpriteID None The actor's current sprite. Note, it's not the actual name of the graphic, but it can be obtained from a graphic name by using GetSpriteIndex. Readable directly but provides no useful info.
Use curstate.GetSpriteTexture().
Modifiable directly with GetSpriteIndex.
frame uint8 None The actor's current frame letter. (0 = A, 1 = B, 2 = C, and so on.) Readable directly Modifiable directly
Scale vector2 XScale
YScale
The actor's current scale. Used by the scaleX and scaleY properties. Can be modified dynnamically with A_SetScale or by changing the value directly. Readable directly Modifiable directly
A_SetScale
picnum TextureID property If this is set to a valid TextureID,
that graphic will be drawn instead of the actor's current sprite.
Readable directly Modifiable directly
(requires {{c|TexMan.CheckForTexture).
Alpha double property The actor's current alpha. See Alpha, can be modified by A_FadeOut, A_FadeIn and by changing the value directly. Readable directly Modifiable directly
A_SetRenderStyle
A_FadeOut
A_FadeIn
A_FadeTo
Health int Health The actor's current remaining health value. Modifying it doesn't equal healing/damaging.
Use DamageMobj to deal damage and GiveBody to heal.
Readable directly A_SetHealth
StartHealth int property Holds the amount of Health with which the actor spawns (as opposed to Health which holds the current health).
Should be modified alongside with health if there's a desire to modify what is considered the actor's "default" health value
(for example, if a script modifies the health of multiple monsters with the intention to make them permanently stronger).
Monsters: StartHealth() or GetMaxHealth
Players: GetMaxHealth
(Need more info)
WoundHealth int WoundHealth See WoundHealth Readable directly (Need more info)
floorterrain int None The TERRAIN definition of the floor under the actor. Readable directly but useless.
Use GetFloorTerrain to get real TerrainDef data.
Readonly
CurSector Sector None The Sector the actor is currently in. Readable directly Readonly
floorsector Sector None The Sector of the floor below the actor. Readable directly Readonly
ceilingsector Sector None The Sector of the ceiling below the actor. Readable directly Readonly
CeilingZ double None The height of the ceiling above the actor (3D-floor aware). Readable directly Readonly
FloorZ double property The height of the floor below the actor (3D-floor aware). Readable directly Readonly
DropoffZ double property The absolute height of the highest floor under the actor. Readable directly Readonly
floorpic TextureID property A TextureID of the floor texture in the actor's current sector.
Can be converted from and to a graphic name with the TexMan functions.
Readable directly Readonly
ceilingpic TextureID property A TextureID of the ceiling texture in the actor's current sector.
Can be converted from and to a graphic name with the TexMan functions.
Readable directly Readonly
projectilepassheight double property See ProjectilePassHeight. Readable directly Modifiable directly
tics int property The duration in tics of the actor's current state. Readable directly Modifiable directly
A_SetTics
projectilekickback int property See ProjectileKickback. Readable directly Modifiable directly
movedir uint8 property (Need more info) (Need more info) (Need more info)
visdir int8 property (Need more info) (Need more info) (Need more info)
movecount int16 property This field is decremented in the actor's TryWalk() function
When it's 0, TryWalk() returns true. Normally used by monsters; when this value is 0, the monster is allowed to move.
Readable directly Modifiable directly
strafecount int16 property (Need more info) (Need more info) (Need more info)
LastLookPlayerNumber int8 property Player number of the last player this actor has found with A_Look or equivalents. Normally used by monsters. Readable directly Modifiable directly
ReactionTime int property Used by ReactionTime property. Readable directly Modifiable directly
A_CountDown
Threshold int property See Threshold. (Need more info) (Need more info)
SpawnPoint vector3 property Vector3 coordinates of where this actor spawned. Readable directly Readonly
SpawnAngle uint16 property Actor's angle at the time when it spawned. Readable directly Readonly
WeaveIndexXY uint8 property (Need more info) (Need more info) (Need more info)
WeaveIndexZ uint8 property (Need more info) (Need more info) (Need more info)
skillrespawncount uint16 property (Need more info) (Need more info) (Need more info)
Mass int property See mass. Readable directly A_SetMass
Score int property (Need more info) (Need more info) (Need more info)
Accuracy int property (Need more info) (Need more info) (Need more info)
Stamina int property See Stamina. (Need more info) (Need more info)
MeleeRange double property See MeleeRange. (Need more info) (Need more info)
PainThreshold int property See PainThreshold. (Need more info) (Need more info)
Gravity double property See Gravity. Readable directly, but GetGravity is preferable. Modifiable directly
A_SetGravity
A_Gravity
A_LowGravity
A_NoGravity
FloorClip double property See FloorClip. Readable directly A_SetFloorClip
A_UnsetFloorClip
DamageType name property See DamageType. Can be modified dynamically with A_SetDamageType. Readable directly (Verification needed) A_SetDamageType
DamageTypeReceived name property The damage type of the most recent attack received by this actor. Readable directly Readonly
FloatBobPhase uint8 property See FloatBobPhase. Readable directly Modifiable directly
A_SetFloatBobPhase
FloatBobStrength double property See FloatBobStrength. Readable directly Modifiable directly
RipperLevel int property See RipperLevel. (Need more info) (Need more info)
RipLevelMin int property See RipLevelMin. Readable directly Modifiable directly (Verification needed)
A_SetRipperLevel
RipLevelMax int property See RipLevelMax. (Need more info) (Need more info)
Species name property See Species. GetSpecies
A_CheckSpecies
While it can be read directly, this is discouraged,
because the GetSpecies override may include custom logic.
Modifiable directly
A_SetSpecies
MinMissileChance uint8 property See MinMissileChance. (Need more info) (Need more info)
SpawnFlags uint property The flags this actor was spawned with. Readable directly
(requires bitwise operators)
Readonly
meleethreshold double property See MeleeThreshold. (Need more info) (Need more info)
maxtargetrange double property See MaxTargetRange. (Need more info) (Need more info)
bouncefactor double property See BounceFactor. (Need more info) (Need more info)
wallbouncefactor double property See WallBounceFactor. Readable directly Modifiable directly
bouncecount int property See Bouncecount. Readable directly Modifiable directly
friction double property See Friction. (Need more info) (Need more info)
FastChaseStrafeCount int property (Need more info) (Need more info) (Need more info)
pushfactor double property (Need more info) (Need more info) (Need more info)
lastpush int property (Need more info) (Need more info) (Need more info)
activationtype int property The method of activation. Normally set with the Activation actor property. (Need more info) (Need more info)
lastbump int property (Need more info) (Need more info) (Need more info)
DesignatedTeam int property (Need more info) (Need more info) (Need more info)
BlockingMobj Actor property A pointer to another actor that this actor is colliding with. Readable directly Readonly
BlockingLine Line property A pointer to a Line this actor is colliding with (the line is not guaranteed to be blocking,
so the flags on the line should be checked manually to make sure that it is).
Readable directly Readonly
Blocking3DFloor Sector property A pointer to a 3D floor this actor is colliding with. Readable directly Readonly
BlockingCeiling Sector property A pointer to a ceiling plane this actor is colliding with. Readable directly Readonly
BlockingFloor Sector property A pointer to a floor plane this actor is colliding with. Readable directly Readonly
PoisonDamage int property See PoisonDamage.
This stores the value (the amount of damage to deal) defined in that property.
(Need more info) (Need more info)
PoisonDamageType name property See PoisonDamageType. (Need more info) (Need more info)
PoisonDuration int property See PoisonDamage.
This stores the duration defined in that property.
(Need more info) (Need more info)
PoisonPeriod int property See PoisonDamage.
This stores the period defined in that property.
(Need more info) (Need more info)
PoisonDamageReceived int property The amount of PoisonDamage the actor is receiving. (Need more info) (Need more info)
PoisonDamageTypeReceived name property The damage type applied through PoisonDamageType the actor is receiving. (Need more info) (Need more info)
PoisonDurationReceived int property The duration of PoisonDamage the actor is receiving. (Need more info) (Need more info)
PoisonPeriodReceived int property The period of PoisonDamage the actor is receiving. (Need more info) (Need more info)
Inv Inventory property A pointer to the first Inventory item in this actor's inventory.
If this actor is an Inventory item itself and is in another actor's inventory,
code>Inv will be a pointer to the next Inventory item in the same linked list.
Readable directly Modifiable directly, but this is not recommended,
as it can break the inventory.
smokecounter uint8 property (Need more info) (Need more info) (Need more info)
FriendPlayer uint8 property Player number of a player this actor is allied to (used by friendly monsters). (Need more info) (Need more info)
Translation uint property Color translation of this actor. Readable directly A_SetTranslation
Translation.GetID()
AttackSound sound property The actor's AttackSound. Readable directly Modifiable directly
DeathSound sound property The actor's DeathSound. Readable directly Modifiable directly
SeeSound sound property The actor's SeeSound. Readable directly Modifiable directly
PainSound sound property The actor's PainSound. Readable directly Modifiable directly
ActiveSound sound property The actor's ActiveSound. Readable directly Modifiable directly
UseSound sound property The actor's UseSound. Readable directly Modifiable directly
BounceSound sound property The actor's BounceSound. Readable directly Modifiable directly
WallBounceSound sound property The actor's WallBounceSound. Readable directly Modifiable directly
CrushPainSound sound property (Need more info) (Need more info) (Need more info)
MaxDropoffHeight double property (Need more info) (Need more info) (Need more info)
MaxStepHeight double property (Need more info) (Need more info) (Need more info)
MaxSlopeSteepness double property (Need more info) (Need more info) (Need more info)
PainChance int16 property (Need more info) (Need more info) (Need more info)
PainType name property (Need more info) (Need more info) (Need more info)
DeathType name property (Need more info) (Need more info) (Need more info)
DamageFactor double property (Need more info) (Need more info) (Need more info)
DamageMultiply double property (Need more info) (Need more info) (Need more info)
TelefogSourceType Class<Actor> property (Need more info) (Need more info) (Need more info)
TelefogDestType Class<Actor> property (Need more info) (Need more info) (Need more info)
MeleeState State property (Need more info) (Need more info) (Need more info)
MissileState State property (Need more info) (Need more info) (Need more info)
DecalGenerator voidptr property (Need more info) (Need more info) (Need more info)
fountaincolor uint8 property (Need more info) (Need more info) (Need more info)
CameraHeight double property (Need more info) (Need more info) (Need more info)
CameraFOV double property (Need more info) (Need more info) (Need more info)
ViewAngle double property (Need more info) (Need more info) (Need more info)
ViewPitch double property (Need more info) (Need more info) (Need more info)
ViewRoll double property (Need more info) (Need more info) (Need more info)
RadiusDamageFactor double property (Need more info) (Need more info) (Need more info)
SelfDamageFactor double property (Need more info) (Need more info) (Need more info)
StealthAlpha double property See StealthAlpha. (Need more info) (Need more info)
RenderHidden int property (Need more info) (Need more info) (Need more info)
RenderRequired int None Determines if this actor should be rendered.
0 - rendered, -1 - hidden.
In contrast to RenderStyle or INVISIBLE, doesn't normally get modified by anything else.
Readable directly Modifiable directly
FriendlySeeBlocks int property See FriendlySeeBlocks. (Need more info) (Need more info)
lightlevel int16 property See Lightlevel. Can be modified dynamically to modify the actor's lightlevel
independently from the cursector's light level.
(Need more info) (Need more info)
InventoryID int None (Need more info) Not readable Not modifiable
freezetics uint property Setting this to a value above 0 freezes the actor for this number of tics, as if it was frozen
by PowerTimeFreezer or calling Level.SetFrozen(true).
(Need more info) (Need more info)

Actor pointers

Name Data type Related actor properties Description How to read How to modify
Target Actor None The actor's target pointer. Readable directly Modifiable directly
For projectiles: set automatically if fired by an appropriate function
For monsters: set automatically by A_Chase
Clearable with A_ClearTarget or directly
Master Actor None The actor's master pointer. Readable directly Modifiable directly
A_SpawnItemEx
Tracer Actor None The actor's tracer pointer. Readable directly Modifiable directly
Natively utilized by seeking projectiles
LastHeard Actor None The last actor heard by this actor.
Normally utilized by monsters when they're alerted.
Readable directly Modifiable directly
Clearable with A_ClearTarget or directly
LastEnemy Actor None The last actor that this actor used to target.
Utilized by monsters if they lost their target pointer.
Readable directly Modifiable directly
Clearable with A_ClearTarget or directly
Alternative Actor None Used in morphing. Pointers to the original actor this actor used to be. (Verification needed) Readable directly (Need more info)
goal Actor None Pointer to the actor's goal point.
Set by Thing_SetGoal.
Readable directly Modifiable directly
poisoner Actor None PoisonDamage|poison damage]]. Readable directly Readonly (Verification needed)

Specials

  • int Special
(Need more info)
  • int special1
(Need more info)
  • int special2
(Need more info)
  • double specialf1
(Need more info)
  • double specialf2
(Need more info)
  • int Args[5]
(Need more info)
  • int weaponspecial
(Need more info)

Readonly fields

The value of these fields either can't be modified, or can be modified by using an appropriate function.

  • readonly Actor snext
(Need more info)
  • readonly color fillcolor
Used by the [[property|stencilcolor} property. Can be modified with SetShade.
  • readonly ViewPosition ViewPos
(Need more info)
  • readonly vector3 Pos
The current global position.
  • readonly double Radius
(Need more info)
  • readonly double RenderRadius
See RenderRadius.
  • readonly State CurState
The state the actor is currently in. Not to be confused with state sequence, which can be obtained with InStateSequence.
  • readonly int Damage
See Damage.
  • readonly State SpawnState
Pointer to the first state in the actor's Spawn state sequence.
  • readonly State SeeState
Pointer to the first state in the actor's See state sequence.
  • readonly int DefThreshold
See DefThreshold.
  • readonly int TID
The actor's TID.
  • readonly int TIDtoHate
The TID of the actor the current actor hates (set by Thing_Hate in ACS).
  • readonly int WaterLevel
The actor's current waterlevel (between 0 and 3).
  • readonly double WaterDepth
How deep the actor is underwater (the number of units between the actor's pos.z and the height of the water surface).
  • readonly color BloodColor
See BloodColor.
  • readonly int BloodTranslation
The translation value that is inferred from the actor's BloodColor. Can be transferred to other actors manually to translate them the same way as this actor's blood sprites are translated.
  • readonly int SpawnTime
The time in tics from the start of the game when this actor was spawned.

Meta fields

  • meta String Obituary
See Obituary.
  • meta String HitObituary
See HitObituary.
  • meta double DeathHeight
See DeathHeight and DONTFALL.
  • meta double BurnHeight
See BurnHeight.
  • meta int GibHealth
See GibHealth.
  • meta Sound HowlSound
See HowlSound.
  • meta Name BloodType
See BloodType. Contains the main blood class name.
  • meta Name BloodType2
See BloodType. Contains the blood splatter class name.
  • meta Name BloodType3
See BloodType. Contains the axe blood class name.
  • meta bool DontHurtShooter
See DontHurtShooter. (deprecated). A_Explode now contains flags for this.
  • meta int ExplosionRadius
See ExplosionRadius and A_Explode.
  • meta int ExplosionDamage
See ExplosionDamage and A_Explode.
  • meta int MeleeDamage
See MeleeDamage.
  • meta Sound MeleeSound
See MeleeSound.
  • meta Sound RipSound
See RipSound.
See MissileHeight.
  • meta Name MissileName
See MissileType (deprecated).
  • meta double FastSpeed
See FastSpeed.
  • meta Sound PushSound
See PushSound.