Fling
Category: Objects
/ Movement
Since engine version: 4.6.5.0 CP
Description
Flings an object into the specified direction. This function is designed for living beings as it will also set the tumbling activity. Additionally it deletes the object's killer.
Syntax
bool Fling
(object pObj, int iXDir, int iYDir, int iPrec, bool fAddSpeed);
Parameters
- pObj:
Object to be flung. This parameter must be specified.
- iXDir:
X flinging speed
- iYDir:
Y flinging speed
- iPrec:
[opt]
Precision. Default 1 if not specified or 0.
- fAddSpeed:
[opt]
Wether to add the speed instead of overwriting it.
Example
Fling(GetCursor(0), 10, -15);
Throws the selected clonk up and to the right.
Sven2, November 2001