Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: The Outer Zone on Sat 18/08/2018 00:01:25

Title: Animating NPC - creating loops for non-playable characters
Post by: The Outer Zone on Sat 18/08/2018 00:01:25
Greetings people of the blue cup!

I want my npc characters to play a loop animation. And I want to control when they go from one frame to the next etc.
This seems straightforward when I make my frames and set the delay in their views.

But when I play the scene, the animation only plays every 15+ seconds.

Hope someone knows why.

Cheers,
Malte
Title: Re: Animating NPC - creating loops for non-playable characters
Post by: eri0o on Sat 18/08/2018 00:57:19
You need to show some code.
Title: Re: Animating NPC - creating loops for non-playable characters
Post by: Lewis on Sat 18/08/2018 07:32:41
My guess: you're trying to handle it as an idle animation.

But yeah, we need more detail. You can't debug without seeing the code and knowing where it is in the project, otherwise it's guesswork.
Title: Re: Animating NPC - creating loops for non-playable characters
Post by: Slasher on Sat 18/08/2018 08:03:17
You can set the idle animation delay between animating in the script..

Example:
Code (ags) Select

cDOG.SetIdleView(36, 5); // this will play the idle view (36) every 5 (5) seconds...Amend to suit...


Hope this helps.
Title: Re: Animating NPC - creating loops for non-playable characters
Post by: The Outer Zone on Sat 18/08/2018 11:20:59
Thank you @Slasher!

This is exactly what I need :)

And yeah, I will remember include my code next time.

Cheers!