checkhealth
The checkhealth command compares either the player or block's health to a value.



"if(checkhealth, object, method of comparison, health)"


Argument Function
object The type of object to check for (player, self).
method of comparison The method in which the two values are being compared (>, <, =, >=, <=).
health The value being compared to.



And example of the checkhealth command used in a script is as follows...




The following script checks if the block's health is above 200, if so it moves the tile position to one spot, and if not, it moves it to another.


if(checkhealth,self,>,200)
{
then(changetile,0,0)
}
else
{
then(changetile,0,32)
}