Low Level Loop animation.

Topics regarding Scripting with Reality Factory
Post Reply
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Low Level Loop animation.

Post by rgdyman »

I've been trying to do something rather simple, ( So I thought)
All I want this pawn to do is Loop the current animtion.

Simple right?

This is what I have so far. ( LowLevel )

{
A_SPEED [20]

Spawn[()
{
Console(true);
LowLevel("Waiting");
}]

Waiting[()
{
AnimationSpeed(A_SPEED);
Animate("Idle"); // The Pawn will stay at the first frame. I need a Loop.
}]

}

I'm sure this is easy. But I seem to miss the small stuff 8)
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

pobably has a small error somewhere, but try this: (i switched it over to high level, hope that's ok)

{
A_SPEED [20]

Spawn[()
{
Console(true);
NewOrder("Waiting");
}]

Waiting[()
{
AnimationSpeed(A_SPEED);
PlayAnimation("Idle", true, "");

RestartOrder();
}]

}
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman »

Thanks AndyCR.

Yes, I can get it to flow nicely in HighLevel.
( As smooth as HighLevel can be that is :lol: )

After I made sure that my animations were in fact working,
I started trial and error with LowLevel.

I've managed to get to animations to loop. ( One at a time though.)
I cant seem to change the animations in the same Order().

I need to throw the pawn to a new Order() to change the Animations. :?
( Knowing it's my fault, not knowing how to capitalize on AnimationBlend()

Can anyone please, lend a minute or two and explain how
to change the animations in the same Order() ?

In the mean time I'll be doinng more "Trial and Error" hoping to
fall face first into the solution.. :shock:

Thanks,
rgdyman
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

ah. i havent done much with low level scripting, so i hope someone else can answer this!
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

Changing Animations in LowLevel is different fom HighLevel because the LowLevel orders are executed every frame and only the last set animation will be played. So you have to make sure that the right one is played at the right time.

Try:




if(Pawn wants to attack)
{
Animate("Attack");
return;
}
if(Pawn wants to walk)
{
Animate("Walk");
return;
}
...
Animate("Idle") //all the above didn't match, the pawn is set to Idle

the 'return' is very important because it makes the script jump to the end of the order and on LowLevel this means that the next set order is executed and if you did not set any, it is the current order(i. e. the order is restarted)
Everyone can see the difficult, but only the wise can see the simple.
-----
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman »

Thank you "Jay".

Ya know, Pickles tried to clear up the return 0; in the past.

I never ran into it then, so it never made any sense to me.

But,

"Now I get it!" :wink:

Thanks again "Jay"!!

rgdyman

( Now I get to double back and optimize....)
Post Reply