These are complicated systems.
Here's an excerpt from a script that gives bricks variable health values.
package EXT_brickdie
{
function ProjectileData::onCollision(%this,%obj,%col,%fade,%pos,%normal){
//echo("colloded");
if(%col.getclassname()$="FxDTSBrick"&&!$EXT_VAR["Fort_isbuild"]&&$EXT["FORTWARS"]){
if(!%col.brickhp){
%col.brickhp=%col.getdatablock().getvolume()*$EXT_VAR["Fort_brickhp"];
}
%max=%col.getdatablock().getvolume()*$EXT_VAR["Fort_brickhp"];
echo("T" @ %col.brickhp @ %this.directdamage*8);
%col.brickhp-=%this.directdamage*8;
echo(%col.brickhp SPC %max*0.50);
if(%col.brickhp <= %max*0.50){// if its less that 50% alive
%col.setcolorfx(5);
}else{
%col.setcolorfx(0);
}
if(%col.brickhp<=0){
if(!$EXT_VAR["Fort_brickdelete"]){
%col.killbrick();
}else{
%col.delete();
}
}
}
Parent::onCollision(%this,%obj,%col,%fade,%pos,%normal);
}
};
activatepackage(EXT_brickdie);