Explode

Category: Objects / Existence
Since engine version: 4.6.5.0 CP (extended in 4.9.6.0 CR)

Description

Makes an object explode. The explosion will affect landscape and objects and the object including all of its contents is removed. If the object is contained, the explosion will also damage all other objects in that container. The owner of the exploding object is considered to have caused the explosion.

Syntax

bool Explode (int iLevel, object pObj, id idEffect, string szParticle);

Parameters

iLevel:
Explosion level. This determines the amount of explosion damage caused and the type of explosion sound played. Up to level 29 the explosion is a Blast1, 30 to 39 is a Blast2, and above is a Blast3.
pObj:
[opt] Object which explodes. Can be 0 in local calls.
idEffect:
[opt] If specified, an object of this type is created instead of a particle. It is assumed that the newly created object will perform the explosion effect. From CR 4.9.6.0
szParticle:
[opt] Type of particle to be created instead of the normal explosion particle.

Remark

See notice for RemoveObject.

Example

Explode(25, GetHiRank(0));
The first player's highest ranking clonk explodes.
See also: BlastObjects, RemoveObject
Sven2, November 2001
Clonkonaut, April 2008