Animation does not play

Posted By: Elitegunner

Animation does not play - 03/25/08 18:06

I have a script here for my model and the animation wich plays without a script but not with one,
problem is that i need to apply an material function!

the script is the follow:

Code:

action my_model
{
my.material = mat_alphatest;
my.skill1 += 3*time_step;
if (my.skill1 > 100) my.skill1 -= 100;
ent_animate(me,"Anim",my.skill1,ANM_CYCLE);
wait(1);

}



when i try to run it i get follow error:

Code:

< (my.skill1>100)my.skill1-=100>
mymodel.wdl 5:0 (): Syntax error - - missing semicolon? my.skill1-=100
.
Script error
Engine shutdown



the semicolon is there, i marked it red above in the code.
So whats the problem?

i'm using A6 commercial v6.60
Posted By: Nidhogg

Re: Animation does not play - 03/25/08 18:21

Quote:

I have a script here for my model and the animation wich plays without a script but not with one,
problem is that i need to apply an material function!

the script is the follow:

Code:

action my_model
{
my.material = mat_alphatest;
my.skill1 += 3*time_step;
if (my.skill1 > 100) my.skill1 -= 100;
ent_animate(me,"Anim",my.skill1,ANM_CYCLE);
wait(1);

}



Maybe try this this.

Code:

action my_model
{
my.material = mat_alphatest;
my.skill1 += 3*time_step;
if (my.skill1 > 100) {my.skill1 -= 100;}
ent_animate(me,"Anim",my.skill1,ANM_CYCLE);
wait(1);

}


Posted By: Elitegunner

Re: Animation does not play - 03/25/08 18:25

no errors anymore, but the animation still shows only one frame and does not play.

btw: its an point-animation, not bones.
Posted By: Nidhogg

Re: Animation does not play - 03/25/08 18:33

Maybe look in the manual under ent_animate() will help you further.
Posted By: Quad

Re: Animation does not play - 03/25/08 18:50

Code:

action my_model
{
my.material = mat_alphatest;
while(1){
my.skill1 += 3*time_step;
if (my.skill1 > 100) {my.skill1 -= 100;}
ent_animate(me,"Anim",my.skill1,ANM_CYCLE);
wait(1);
}
}



you need a loop
Posted By: Elitegunner

Re: Animation does not play - 03/25/08 19:44

that works, but the animation is too fast, even with 1*time_step
Posted By: Quad

Re: Animation does not play - 03/25/08 19:54

try 1*time_step/100 or something.
Posted By: Elitegunner

Re: Animation does not play - 03/25/08 19:56

omg i'm stupid ^^ my.skill1 += 0.08*time_step; that did it ^^
© 2023 lite-C Forums