User Tools

Site Tools


crpl:docs:damagecreeper

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- Creeper Commands

DamageCreeper

ArgumentsResultNotation
Cell coordinates, max number of cells, radius, amount, terrain flagNone. i1 i2 i3 i4 i5 b –

Description

Reduces creeper level in a disk of radius i4, centered at cell (i1,i2). The amount of creeper removed at each cell is i5/1000000, and the central cell is reduced twice.

If i3 is larger than the number of cells in the disk, this parameter has no effect. Otherwise only i3 cells are reduced (the central cell counts twice), moving out from the center in concentric squares. The total amount of creeper removed is

i5/1000000 * min(i3, number of cells in disk + 1)

In other words, the area affected is roughly the intersection of a disk of radius i4 and a square of side length sqrt(i3-1), both centered at (i1,i2).

If the terrain flag b is TRUE, then cells at higher terrain level than the central cell are not affected.

The command also creates a graphical mist effect.

This command uses integer creeper (1000000 units per creeper).

Examples

# Reduce creeper level by 1.0 in a radius 5 disk centered at the current mouse location.
# The central cell is lowered by 2.0.
# Note that parameter i3 is too large to modify the area of effect.
DamageCreeper(GetMouseCell 9999 5 1000000 FALSE)

# Reduce creeper level by 2.0 in a 5 by 5 square centered at the current mouse location.
# The central cell is lowered by 4.0.
# Terrain higher than current mouse location is unaffected.
# Note that parameter i4 is too large to modify the area of effect.
DamageCreeper(GetMouseCell 26 20 2000000 TRUE)
crpl/docs/damagecreeper.1427554360.txt.gz · Last modified: 2015/03/28 10:52 by warren