timer call a gameobject to explode script combine help

Now,i have a empty gameobject(HUB) attach with timer script. and a gameobject(Sphere) attach with Explosion when collision. So what i want is to combine them as in if(timer>100),see to add a rigidbody to the sphere or some how make the sphere fall function and to trigger my sphere OnCollisionEnter to explode. Any1 knows how to do it please help me thx alot. my 2 script below:

for now i cant add a rigibody to the sphere, as it will fall immediately.what i can think of is : if(timer>100) add a rigidbody to it. or add a rigidbody first as there got a Gravity check Box. by uncheck first. if(timer>100) then check the gravity box. So i doesnt know how to write it in script, any1 have idea.


var timer : float = 0;
var FuelGauge : Texture;

function OnGUI () {

   if(timer > 100)


   //i wanted a function to call the sphere fall
   GUI.Label( Rect( 5, 70, 100, 100 ), FuelGauge[10] );

   Debug.Log("100 sec passed - No Fuel");



function Update () {

timer = Time.time * 1;


Explosion Script

var explosion : Transform;

function OnCollisionEnter(){




 var explosion1 : Transform;


 explosion1 = Instantiate(explosion,transform.position,transform.rotation);


The simplest way is to put a rigidbody on the sphere when it is instantiated, set it to 'isKinematic = true' and then keep a reference to it on your timer. So-

Timer Script-

var sphere : Rigidbody;

function Start()
    sphere.isKinematic = true;

function Update()
    // increment the timer however you feel like
    if(timer >= 100)
        // allow the sphere to fall
        sphere.isKinematic = false;
        // since the sphere's rigidbody will have fallen asleep by now,
        // force it to wake up!
        // attach the 'DestroyOnContact' script to the sphere!


function OnCollisionEnter(){
    // a simple script that destroys the ball when it hits something.

if a rigidbody is kinematic, it does not have physics steps applied to it, however it can be struck by other objects. This is why the DestroyOnContact should only be added when the rigidbody is set non-kinematic.

EDIT: As it turns out, if you set kinematic on a rigidbody from a script, it doesn't automatically wake the rigidbody up! You need to use the line


to force it to start listening to physics again.