Page 1 of 1

Another animation index problem

PostPosted: Tue Aug 07, 2007 4:37 pm
by Freddy
I made a mouse button down event on one of my actors. In the script editor, I wrote
if(animindex == 0)
{
ChangeAnimation("Event Actor", "injuredbugleft0", FORWARD);
}
if(animindex == 2)
{
ChangeAnimation("Event Actor", "Squashedbug0", FORWARD);
}

I tried it, and the first time, it worked. I tried it again, and all it did was skip that whole first part of the script, and change its animation to the "squashed bug". I went to see if there was something else in my actor control that was preventing the script from activating, but there was nothing. :x / :evil:/ :cry: . Can anyone help me?

Re: Another animation index problem

PostPosted: Tue Aug 07, 2007 5:20 pm
by Sgt. Sparky
Freddy wrote:I made a mouse button down event on one of my actors. In the script editor, I wrote
if(animindex == 0)
{
ChangeAnimation("Event Actor", "injuredbugleft0", FORWARD);
}
if(animindex == 2)
{
ChangeAnimation("Event Actor", "Squashedbug0", FORWARD);
}

I tried it, and the first time, it worked. I tried it again, and all it did was skip that whole first part of the script, and change its animation to the "squashed bug". I went to see if there was something else in my actor control that was preventing the script from activating, but there was nothing. :x / :evil:/ :cry: . Can anyone help me?

maybe use if(animindex == 1)
{
....
}
:D

PostPosted: Tue Aug 07, 2007 11:22 pm
by Freddy
I tried that, but thanks anyway. :)