A_CapeChase is an action that is commonly used to make an Object trail another Object, such as its original purpose of making a cape follow Sonic for his "Super" form in versions predating v1.09. It does not make the actor move; it only sets its location relative to that of its target or tracer. This is only done once per state, so for the actor to continuously follow its target/tracer, this action will need to be called every tic.
If Var1's lower 16 bits are 0, the actor's target will be used, if they are 1, the tracer will be used. By default, the actor will assume the position and angle of its target/tracer, but it is possible to set offsets in all three dimensions. Var1's upper 16 bits set the actor's vertical offset, relative to the bottom of the target/tracer. Var2's upper 16 bits set the forward/backward offset. Var2's lower 16 bits set the left/right offset, with positive values giving a left offset and negative values giving a right offset. All offsets are measured in fracunits. Thus, Var1 and Var2 can be calculated like this:
- Var1 = (vertical offset × 65536) + 0 or 1
- Var2 = (forward/backward offset × 65536) + left/right offset
This action also runs a check on the health of the target/tracer Object: If it no longer exists, or if its health is equal to or less than zero, the actor will be removed from the map. Note that landed projectiles do not set their health to zero.
|Var1||Lower 16 bits: 0 – use target; 1 – use tracer|
Upper 16 bits: vertical offset
|Var2||Lower 16 bits: Left/right offset|
Upper 16 bits: Forward/backward offset
|Actions – Movement||[view]|
|A_BubbleRise • A_BunnyHop • A_CapeChase • A_Chase • A_FishJump • A_ForceStop • A_HomingChase • A_InstaLoop • A_KnockBack • A_MouseThink • A_MoveAbsolute • A_MoveRelative • A_PushAway • A_ScoreRise • A_SkullAttack • A_Thrust • A_ZThrust|