User Tools

Site Tools


crpl:docs:destroy

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- Unit Commands

Destroy

Arguments Result Notation
Unit UID to Destroy, Explosion Mode (0,1,2,3) n1 n2--

Description

Destroys the specified unit. WARNING: ENSURE YOU HAVE SAVED THE MAP BEFORE CALLING THIS! This call will destroy the unit! For the explosion mode argument, 0 means no explosion and no sound, 1 means a small soundless flash, 2 means a full explosion with sound, 3 means full explosion but no sound.

Examples

$targetX:0
$targetY:0
$speed:7.0
$payload:20

once
	SetUnitAttribute(self CONST_CREATEPZ false)
	QueueMove(<-targetX <-targetY <-speed)
endonce

if (GetQueuedMoveCount eq0)
	#Done
	Destroy(self 2)
	
	SetCreeper(CurrentCoords <-payload)
endif
crpl/docs/destroy.1360618732.txt.gz · Last modified: 2014/10/01 15:02 (external edit)