# SetTransferZone

Objects
Status
5.1 OC
bool
int x X position of the top left corner of the new transfer zone, relative to the object center.
int y Y position of the top left corner of the new transfer zone, relative to the object center.
int width Width of the new transfer zone.
int height Height of the new transfer zone.
Sets the transfer zone of the object. If the pathfinding trail of another object leads through this transfer zone (a transfer zone is always considered completely passable in pathfinding) ControlTransfer calls will be made to the transfer zone object for the passing clonk. In these calls, the necessary script commands should be given to the clonk so he can pass the object and reach his destination.
Transfer zones have to be set anew when the object has moved. Also, they should be set anew in response to a UpdateTransferZone callback made by the engine.
protected func Initialize() { return UpdateTransferZone(); }

protected func UpdateTransferZone() { return SetTransferZone(-GetX(), -GetY(), LandscapeWidth(), LandscapeHeight());

protected func ControlTransfer(clonk, endx, endy) { clonk->SetPosition(endx, endy); return 1; }
Script for a cheat object: a clonk with a movement command will be immediately warped to the destination.
Sven2
2003-06