Steps:
Create you explosive model.
Create your particle effect and prefab it.
Delete the particle effect in the scene. :)
Create a script that places an explosive. It has to provide a position and rotation, unless you are planting on the ground, then only a position.
Call this function from the previously mentioned script.
var explosive : Transform;
var explosion : Renderer; //Particle Prefab goes here.
function PlaceExplosive (position : Vector3, rotation : Quaternion = Quaternion.Identity, time : float) {
var detonator : Transform = Instantiate(explosive, position, rotation) as Transform;
yield WaitForSeconds(time);
Destroy(detonator.gameObject);
Instantiate(explosion, position, rotation);
}
answered
Feb 13 '11 at 02:19 PM
Peter G
15k
●
16
●
44
●
136