ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


actor_properties

Actor properties

ACSUtils provides wrapper functions for all actor properties. For every property PropertyName, ACSUtils provides two functions:

type GetActorPropertyName(int tid)

void SetActorPropertyName(int tid, type value)

The only exception is that GetActorViewHeight is a native ZDoom function that takes crouching into account. To access the actual value of the ViewHeight property, use GetActorProperty(tid, APROP_ViewHeight).

Network optimization

All SetActorPropertyName functions first call GetActorProperty and compare the new value of the property to the current one. If both values are the same, SetActorProperty is not called. This automatically optimizes bandwidth use in Zandronum multiplayer.

function void SetActorHealth(int tid, int Health)
{
	if (GetActorProperty(tid, APROP_Health) != Health)
		SetActorProperty(tid, APROP_Health, Health);
}

Some actor properties are optimized by zandronum itself. However, the set of optimized actor properties depends on zandronum version, and not all actor properties are currently optimized (https://zandronum.com/tracker/view.php?id=1609).

All string properties are compared in a case-insensitive way before being set. This means, for example, that SetActorNameTag(0, "Thing") will not call SetActorProperty if the NameTag property is already set to "thing".

List of all properties

type Name
int Accuracy
str ActiveSound
fixed Alpha
bool Ambush
str AttackSound
fixed AttackZOffset
bool ChaseGoal
int Damage
fixed DamageFactor
fixed DamageMultiplier
str DamageType
str DeathSound
bool Dormant
bool Dropped
fixed Friction
bool Friendly
bool Frightened
fixed Gravity
int Health
fixed Height
bool Invulnerable
fixed JumpZ
int Mass
int MasterTID
fixed MaxDropOffHeight
fixed MaxStepHeight
fixed MeleeRange
str Nametag
bool NoTarget
bool NoTrigger
str PainSound
fixed Radius
int ReactionTime
int RenderStyle
fixed ScaleX
fixed ScaleY
int Score
str SeeSound
int SpawnHealth
str Species
fixed Speed
int Stamina
int StencilColor
int TargetTID
int TracerTID
fixed ViewHeight
int Waterlevel
actor_properties.txt · Last modified: 2017/07/04 15:06 by korshun