DetachMesh

Category: Objects / Display
Since engine version: 1.0 OC

Description

If a mesh was previously attached to another one via AttachMesh then it can be detached again using this function.

Syntax

bool DetachMesh(int attach_number);

Parameter

attach_number:
Number of the mesh to detach. AttachMesh returns such a number.

Example

func FxIntCarryBowStart(object target, effect)
{
	effect.mesh = target->AttachMesh(Bow, "pos_hand1", "main");
}

func FxIntCarryBowStop(object target, effect)
{
	target->DetachMesh(effect.mesh);
}
Script for an effect: The effect target carries a bow as long as the effect remains active.
See also: AttachMesh
Clonk-Karl, 2010-04