Split2Components

Category: Objects / Existence
Since engine version: 1.0 OC

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();

Remark

See notice for RemoveObject.

Example

protected func ControlUse()
  {
  var target=FindObject(Find_AtPoint(0,0),Find_Exclude(this));
  if (!target) return false;
  target->Split2Components();
  return true;
  }
Script for a tool: It splits the first object it finds at it's position on usage.
See also: GetComponent, RemoveObject
Sven2, 2002-08