Exit

Category: Objects / Position
Since engine version: 4.6.5.0 CP

Description

Moves an object from its container. Optionally, sets its exit velocity.

Syntax

bool Exit (object pObj, int iX, int iY, int iR, int iXDir, int iYDir, int iRDir);

Parameters

pObj:
[opt] Object to be moved outside. Can be 0 in local calls.
iX:
[opt] X exit position. Offset to the calling object in local calls.
iY:
[opt] Y exit position. Offset to the calling object in local calls.
iR:
[opt] Object rotation on exit in degrees.
iXDir:
[opt] Horizontal exit velocity. This is the actual speed value (with no precision multiplication).
iYDir:
[opt] Vertical exit velocity. This is the actual speed value (with no precision multiplication).
iRDir:
[opt] Rotational speed of the exiting object.

Example

Exit(Contents(), 0,-20, Random(360), 0,-15, Random(11)-5);
Moves the first contained object from the calling object, rotates it randomly and throws it upwards.
See also: Enter
Sven2, November 2001
matthes, October 2004