globals.resetDestruction

Section: Destruction

What it does

globals.resetDestruction resets Destruction on a globals object. It takes id. id is optional.

Signature

resetDestruction(id?)

Arguments

  • idoptional

Example · generated

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

globals.resetDestruction 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