Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Anarcho on Sat 03/04/2004 18:21:18

Title: idle animation problems
Post by: Anarcho on Sat 03/04/2004 18:21:18
Allright, I'm having a wierd problem with idle animation for an npc.  First off, I didn't realize for the longest time that there was a room specific interaction editor (yes, i'm a fool), so i was trying to put the SetCharacterIdle function in all sorts of places.  Anyway, now that i figured it out, i opened the room interaction editor, and in the repeatedly execute section, I set the Character idle on view three with 0 delay.  Which i thought would work and kinda does.  The problem is, my npc only goes into the idle animation when my main character LOOKS at various things.  So in other words, the player looks at the couch, and while the display message is up, the character goes into the idle animation.  But i want him to do the idle animation whenever he's not being interacted with...

Maybe my other tinkerings screwed something up, but i can't figure what i did.

One other thing, for the idle animation view, there are two loops because its so long...but after it goes through the first loop, it goes into the second, and when done, only repeats the second loop.  I want it to repeat the entire thing.  I think i might have seen this problem elsewhere, so i can look it up later if no one wants to answer.

thanks,

Logan
Title: Re:idle animation problems
Post by: strazer on Sat 03/04/2004 18:40:22
repeatedly_execute is usually called 40 times a second, so your SetCharacterIdle is constantly executed, thus the idle animation has no chance to run.
The reason the animation plays when a message is displayed is because repeatedly_execute is halted when the game is blocked.

Just put SetCharacterIdle in "Player enters screen (before fadein)" once. The idle animation will be played automatically/repeated, depending on the delay you specify.

As for the repeat only playing the second loop, it's probably a bug. I guess noone has ever used a long enough idle animation for this behavior to be noticed.
Title: Re:idle animation problems
Post by: Anarcho on Sun 04/04/2004 18:39:27
So should i email chris about this potential bug, or does anyone know how to fix it?

thanks a lot for the other help!

-Logan
Title: Re:idle animation problems
Post by: strazer on Sun 04/04/2004 19:28:51
I wouldn't send an e-mail.
I think Chris only browses the Technical forum, you can pm a moderator to move this thread there.
Title: idle animation loop problems
Post by: Anarcho on Sun 04/04/2004 23:54:51
I posted this in the beginners forum, but no one could answer it.  For an npc idle animation view, i have two loops because it's kinda long.  The problem is that once it finishes with the first loop and goes to the second, it keeps repeating the second loop instead of going back to the first.  Can anyone explain this?

-Logan
Title: Re:idle animation problems
Post by: Pumaman on Mon 05/04/2004 20:25:24
The idle animation has one loop for each direction that the character is facing, so I don't understand how a multi-loop idle animation would work?
Title: Re:idle animation problems
Post by: strazer on Mon 05/04/2004 21:50:26
Good point. :P
I just assumed that the loops for the next directions would automatically be moved down if you decided to lengthen the animation for a particular direction.
Title: Re:idle animation problems
Post by: Anarcho on Tue 06/04/2004 00:13:57
I just checked the "run next loop after this" box on the first loop so it would go directly to the next, which is guess would be another direction.  And it works, the character goes through one loop and then the next, but doesn't go back.

Maybe i'm just confused and doing something wrong, i'm still a beginner.
Title: Re:idle animation problems
Post by: Scorpiorus on Tue 06/04/2004 16:08:29
Quote from: logan on Tue 06/04/2004 00:13:57
I just checked the "run next loop after this" box on the first loop so it would go directly to the next, which is guess would be another direction.  And it works, the character goes through one loop and then the next, but doesn't go back.

Maybe i'm just confused and doing something wrong, i'm still a beginner.
I have encountered this before. It just because AGS mistakenly takes into account the run next loop after this for idle animation (which it shouldn't). Basically you can't have more than one loop for each direction.

~Cheers
Title: Re:idle animation problems
Post by: Pumaman on Tue 06/04/2004 20:53:26
The idle view is supposed to have one loop for each direction - the same as the normal walking view.

So loop 0 would have the facing-down idle loop; loop 1 would be the right-facing idle loop, etc

When the character is idle, the loop that plays is the direction that the character is currently facing.

Multi-loop idle animations therefore aren't supported since they would interfere with each other.
Title: Re:idle animation problems
Post by: Scorpiorus on Tue 06/04/2004 21:38:58
Provided isn't it too much hassle could we have AGS to ignore run next loop after this if an idle animation is being played?
Title: Re:idle animation problems
Post by: Pumaman on Wed 07/04/2004 21:25:58
That would be possible - but then we'd only end up with questions asking why it isn't working. I don't think it's worth changing.
Title: Re:idle animation problems
Post by: Scorpiorus on Wed 07/04/2004 22:04:20
I see... "Every stick has two ends". :)

~Cheers