- Home /
how do I create a freeze blast
I want a script that will freeze enemies for a few seconds. I have a shooting script, but I don't know how I would freeze the enemies.
This is My shooting script
var projectile : Rigidbody;
function Update () {
if (Input.GetKeyDown(KeyCode.Mouse0)) {
var clone : Rigidbody;
clone = Instantiate(projectile, transform.position, transform.rotation);
clone.velocity = transform.TransformDirection (Vector3.forward * 50);
}
}
Comment
You are more likely to get answers if you format your code. Select the code and use the 101/010 button. I've done it for you this time. Also freezing would be done in the enemy script. It would be helpful if you post that script in addition/rather than this one.
Your answer
Follow this Question
Related Questions
AI Slowing Down Game 0 Answers
Freeze camera on pause 0 Answers
Unity freezes tab on Chrome 0 Answers
Unity 4.6 Freeze after launch game 0 Answers
C# - Ammo in Shoot Array?! 1 Answer