4 blocks destroyed - gravity true

Lads,
I’m shooting projectiles at a tower of blocks. When a block is struck it is destroyed. Once 4 blocks are destroyed I’d like to turn on gravity for ALL the blocks so the tower will crumble.

Any ideas on how to script something like this?

Thx

Stef

Assuming you have a Rigidbody attached to each block, you could set their useGravity flags to true, once the tower should collapse.

Thanks for the feedback. I’m trying this but not having much success:
var smokePrefab: Transform;
var int objectDestroyed = 0;

//Invoke("OnCollisionEnter", 2);
function OnCollisionEnter(collision : Collision) 
{
if (collision.gameObject.tag == "missile_1")
 {
Destroy (gameObject);
Instantiate (smokePrefab, transform.position, transform.rotation);
++objectDestroyed;

 }
 {
 if objectDestroyed == 4;
 {
 gameObject.rigidbody.useGravity = true;
 }
}

Any suggestions?..