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)
GetActorProperty(tid, APROP_ViewHeight)
.
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).
SetActorNameTag(0, "Thing")
will not call SetActorProperty
if the NameTag property is already set to "thing"
.
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 |