~~NOTOC~~
<=[[4rpl:start| Index]] \\
<=[[4rpl:start#creeper| Creeper]]
* [[4rpl:commands:AddCreeper|Add]]
* [[4rpl:commands:GetCreeper|Get]]
* [[4rpl:commands:SetCreeper|Set]]
====== SetCreeper ======
SetCreeper(<-cellX <-cellZ <-creeperAmt <-dontLower)
===== Description =====
Sets the creeper amount at the specified integer map coordinates. A value of 0 means no creeper. A negative value indicates anticreeper.
The dontLower argument is a Boolean indicating whether the call is allowed to reduce the amount of creeper or anticreeper. If set to true and the amount of creeper in the cell exceeds the amount being set, the call will not affect the creeper. See Notes
The amount specified is a floating point number where 1 represents creeper that has a height of 1 terrain unit.
:NOTE: Creeper does not immediately render unlike its editor counter part of placing Creep. It will come out of the ground as the game simulates, a behavior you might not expect from this API but from [[4rpl:commands:addcreeper|AddCreeper]].
===== Examples =====
SetCreeper(42 23 5 false)
=== Notes ===
The dontlower argument only affects SetCreeper if a like-type of creeper is being set. For instance if you call setcreeper with a positive amount (creeper) and the destination contains creeper. Or if you call setcreeper with a negative amount (anticreeper) and the destination contains anticreeper.
If you call SetCreeper with a positive number (creeper) and anticreeper is at the destination, dontlower has no effect. Similar for anticreeper with creeper at the destination.
<=[[4rpl:start| Index]]