Skip to content

PersistentEffectConditionData

Value struct

Shared - used by classes in Characters and skins and Spells and combat.

Class Documentation

Edit documentation

Effects and submesh changes that apply to a unit while two conditions are true: one evaluated on the unit that owns the entry, and one on a source unit.

The engine checks every entry on each update:

  1. OwnerCondition is evaluated on the unit that owns the entry, and SourceCondition on the source unit. A condition that is not set counts as true.
  2. If either condition is false, the entry's effects are destroyed and its submesh changes are removed.
  3. If both are true and the entry has no live effects, every item of PersistentVfxs is spawned once. The effects stay until a condition turns false.
  4. The entry's submesh changes are recalculated. See SubmeshesToShow.

When the conditions go from false to true again, the effects spawn again.

Properties

ForceRenderVfx

Bool = false
Edit documentation

When false, some states of the owner hide the entry's effects, for example when the owner has faded out completely. When true, the owner's state does not hide them. Other reasons to hide an effect, such as fog of war, still apply.

SubmeshesToHide

List2<Hash> = []
Edit documentation

Hashes of submesh names that are hidden while the entry is active. A hash that does not match a submesh of the unit's current mesh is ignored. See SubmeshesToShow for how entries combine.

SubmeshesToShow

List2<Hash> = []
Edit documentation

Hashes of submesh names that are shown while the entry is active. A hash that does not match a submesh of the unit's current mesh is ignored.

The engine combines all active entries: the show sets are joined, and every submesh in any hide set is removed.

Referenced by 2 classes · 2 properties