globals.makeDestructible

Section: Destruction

What it does

globals.makeDestructible creates a Destructible in globals. It takes id and config. id and config are optional.

Signature

makeDestructible(id?, config?)

Arguments

  • idoptional
  • configoptional

Example · generated

function start() {  makeDestructible('destructible', {});}

globals.makeDestructible is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.

10 members in globals