Skip to main content

Effector

An Effector is responsible for sending Effects to a target.

As you'll see in the samples, Skill objects contain components derived from the Effector base class.

These components hold one or more Effect Packs and send them to the target when a collision occurs.

A reference to the Effector is also passed to the Processors during Effect processing.

If an Actor is assigned to the Effector, Processors can also access the Stats of the Effector's Actor while processing the Effect.

Power's core package doesn't contain concrete Effector types — you can find ready-to-use Effector implementations in the General Expansions package.

Fields​

FieldDescription
ActorDefines the Actor that belongs to the Effector itself. This field is independent of the Source. While the Source may refer to another Actor, this field defines the Actor that stores the Effector's own Stats. For example, in the Deadeye String skill from the 3DCells sample, the arrow itself is the Effector's Actor. Before being fired, the arrow is charged, and if the charge reaches a certain range, the attack becomes a critical hit.
SourcelessInitializes the Effector using its own Actor field as the Source instead of waiting for an external initialization. All relation checks are performed using the Effector's own Actor.
Use Source StatKeeps the Source in an Actor Stat of the Effector's own Actor instead of a field. Initialization writes the given Source into it, and Effects can change it later — e.g. a deflected projectile that now belongs to the deflector.
Source Stat KeyThe Actor Stat that holds the Source when Use Source Stat is on.