SetActorProperty

From Eternity Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

ACS function

SetActorProperty(tid, property, value)
GetActorProperty(tid, property)
CheckActorProperty(tid, property, value)

These functions access a property for actors tagged tid. Property is one of the constants starting with APROP_. Value can be expressed into a form supported by the given property type. See the following table.

Use SetActorProperty to set a property (not all are writable and will be marked in the table). Use GetActorProperty to return a property's value. You can also use CheckActorProperty to check equality of a property with a given value.

Property Type Notes Description
APROP_Health int current thing health
APROP_Speed int/float read-only thing speed, commonly expressed in int for monsters or in float for projectiles
APROP_Damage int thing damage - usually projectile or lost soul impact damage
APROP_Alpha float thing opacity, expressed between 0.0 and 1.0
APROP_Ambush bool whether the thing has the AMBUSH flag, i.e. reacts to gunshots
APROP_Invulnerable bool whether the thing has the INVULNERABLE flag
APROP_Friendly bool whether the thing has the FRIEND flag
APROP_SpawnHealth int read-only thing initial health at spawn time, usually its maximum
APROP_Dropped bool whether the thing has the DROPPED flag. Ammo dropped from monsters has this flag.
APROP_TargetTID int TID of thing's target (or projectile's spawner), or 0 if no target
APROP_TracerTID int TID of seeker missile's target (0 if none)
APROP_ScaleX float X scale of sprite
APROP_ScaleY float Y scale of sprite
APROP_Dormant bool whether thing has the DORMANT flag
APROP_Counter0, up to
APROP_Counter7
int thing counter value

See also