A_Warp(int ptr_destination, float x-offset, float y-offset, float z-offset, float angle, int flags , state success_state)
This command is considered an extension of A_Fire, with more versatility and flexible actor controls. Unlike A_Fire, it does not require an actor to be visible like the Archvile's fire attack, and these can be used with Actor pointers.
ptr_destination: Teleports the calling actor to the pointer they have. See Actor pointers for more information.
x-offset: Specifies how far forward/backward in front/behind of the pointed actor the calling actor will appear. Positive numbers result in the actor spawning in front, and behind for negative.
y-offset: Specifies how far to the side the calling actor will appear to the pointer. Positive numbers are further to the pointer actor's right, while negative numbers spawn them more to the left.
z-offset: Specifies how high off the ground to appear. Positive numbers mean a higher altitude, negative means under the pointer and possibly into the ground.
angle: Specifies the angle at which the actor will appear in relation to the pointer.
Flags that affect the behaviour
- WARPF_ABSOLUTEOFFSET: Do not apply the angle to the xy-offset
- WARPF_ABSOLUTEANGLE: Use the angle parameter as an absolute angle (not an offset)
- WARPF_USECALLERANGLE: Use the caller's angle as a base for the angle parameter (Default is to use the reference actor)
- WARPF_NOCHECKPOSITION: Blindly accept any resultant position
- WARPF_STOP: Reduce caller velocity to 0 when the move is completed
- WARPF_TOFLOOR: Set caller z relative to floor z where teleported to, instead of relative to reference actor
- WARPF_TESTONLY: Does not warp the actor, but still allows it to jump to the success state if it were to warp. This is useful for checking things and causing chains to occur, such as with inventory items.
Flags to customize appearance of the warp
- WARPF_INTERPOLATE: Keep old interpolation data (make it appear as if actor moved from its previous location)
- WARPF_WARPINTERPOLATION: Modify interpolation data with the vector PlayerNewPosition - PlayerOldPosition.
- WARPF_COPYINTERPOLATION: Copies the actor's interpolation data for itself, allowing the actor to mimic the pointer closely.
success_state: An optional state to jump to in the event of success.
A replication of A_Fire would be similar to this:
A_Warp(AAPTR_TRACER, 24, 0, 0, 0, WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)