Class FollowCasterAction
Keeps an ability object in front of its caster: the striking edge of a charge, carried along by the rush rather than flying a path of its own.
[Serializable]
public class FollowCasterAction : BaseAction, IAction
- Inheritance
-
FollowCasterAction
- Implements
- Inherited Members
Remarks
Wire it to the ability's OnTick, with Speed 0 and no move action: this IS the object's motion. The object's sweep runs after the tick events, from where it was to where this put it, so everything the caster rushes through is swept and lag compensated like any projectile's path.
With EndWithCasterRush the object ends when the caster's rush does (it struck something, or ran its length), on the peers that resolve hits; a peer that only watches lets its copy run out its lifetime, which changes nothing because it applies nothing. A caster with no motor (an NPC) never rushes, so its object simply lives out its lifetime in front of it.
Fields
EndWithCasterRush
End the object once the caster's rush has ended.
[Tooltip("End the object once the caster's rush (CasterRushAction) has ended.")]
public bool EndWithCasterRush
Field Value
ForwardOffset
Metres ahead of the caster's feet, along its facing.
[Tooltip("Metres ahead of the caster's feet, along its facing.")]
public float ForwardOffset
Field Value
HeightOffset
Metres above the caster's feet.
[Tooltip("Metres above the caster's feet.")]
public float HeightOffset
Field Value
Methods
Execute(ICharacter, EventData)
Executes the action. Must be implemented by derived classes.
public override void Execute(ICharacter initiator, EventData eventData)
Parameters
initiatorICharacterThe character initiating the action.
eventDataEventDataEvent data for the action.