Fire goes out

Hi,
Is there a way to make a flame go out after a time period? I want a car to be on fire but in real life it is impossible to have a never ending fire naturally so I want it to go out after 2 minutes. But during that time I want the flame to get smaller and smaller. Is this possible? Any help would be greatly appreciated!

Not sure how you expect people to help when you don’t even tell us what you’re USING for the flame… Please be more descriptive. I’ll just assume you’re using a particle system.

If you’re using a particle system, decrease the Max Emission over time. If you don’t know how, look at Coroutine. For future reference on finding things like this, have a look at the Unity Script Reference.

Try studying code instead of asking for scripts. If editing max emission over time is too much for you, the try this

var fire : Gameobject;
var destroyTime:float=5;
function Start(){
Destroy (fire, destroyTime);

This should work