lucasrn
1
My animation dont stop looping and is configured in Once wrap mod… This is a script error i think. Anyone can help me?
var wrapMode: WrapMode;
function Start () {
animation["ShootAnim"].wrapMode = WrapMode.Once;
}
function Update () {
if(Input.GetMouseButtonDown(0));
animation.Play("ShootAnim");
}
Try this:
var wrapMode: WrapMode;
function Start () {
animation["ShootAnim"].wrapMode = WrapMode.Once;
}
function Update () {
if(Input.GetMouseButtonDown(0));
animation.Play("ShootAnim");
else{
animation.Stop("ShootAnim");
}
}
Talmore
3
try opening and closing the if package “{ }” before the else begins. Replace the ; after the if with a {.
function Update () {
if(Input.GetMouseButtonDown(0)){
animation.Play("ShootAnim");
}
else{
animation.Stop("ShootAnim");
}
}
lucasrn
4
Done o.O 
var wrapMode: WrapMode;
function Start () {
animation["ShootAnim"].wrapMode = WrapMode.Once;
}
function Update () {
if(Input.GetMouseButtonDown(0)){
animation.Play("ShootAnim");
}
if(Input.GetMouseButtonUp(0)){
animation.Stop("ShootAnim");
}
}