- Home /
How to clone an explosion to show an continue smoking effects
Some how i need to clone the effect of continue explosion effect. Can someone teach me some way of doing it. Thx alot. Below is my script for explosion. some how i make some changers in the detonator in duration in smoke. It is not the effect that i wanted. so i need to clone the explosion.
var explosion : Transform;
var sound1 :AudioClip;
var audio1: AudioSource;
function OnCollisionEnter(Col : Collision){
var aSources = GetComponents(AudioSource);
audio1 = aSources[1];
if(Col.gameObject.name == "Terrain")
{
if(occur == true)
{
var explosion1 : Transform;
explosion1 = Instantiate(explosion,transform.position,transform.rotation);
audio1.PlayOneShot(sound1);
}
}
}
$$anonymous$$ake two things- an explosion, and an ongoing smoke effect. The explosion will finish before the smoke becomes obvious.
this script will explode and show smoke co$$anonymous$$g up. the problems is that it stay for 4s and all gone
Answer by Tasarran · Jan 27, 2012 at 03:59 AM
Do what Syclamoth says, make two emitters.
One is a firey explosion, and the other is an emitter with smoke particles slowly rising.
Instantiate both at the same time, the explosion will destroy itself, but you'll have to make the smoke vanish after a set amount of time.
o i get it, Thx. abit slow in getting what it say lol sorry about that
Your answer
Follow this Question
Related Questions
transform.position assign attempt for 'Cubie' is not valid. Input position is { NaN, NaN, NaN }. 2 Answers
Cast Source Instantiating Error 1 Answer
Deleting an instance 2 Answers
How do I properly duplicate an object in a editor script? 3 Answers
How to remove the (Clone) from instantiated prefab C# 2 Answers