Split2Components

Category: Objects / Existence
Since engine version: 4.6.5.0 CP

Description

Splits an object into its components. The new component objects will be created with random rotation and a low speed in random direction at the position at which the object was located. The original object is removed. If the original object was contained, the new component objects will be created in the original container.

Syntax

bool Split2Components (object pObj);

Parameter

pObj:
[opt] Object to be split. Can be 0 in local calls.

Remark

See notice for RemoveObject.

Example

protected func ControlDigDouble()
  {
  var pTarget=Contents();
  if (!pTarget) return();
  Split2Components(pTarget);
  return(1);
  }
Script for a clonk: He splits the first object he carries on double dig.
See also: GetComponent, RemoveObject
Sven2, August 2002