Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Wayne Adams on Sun 12/04/2009 06:00:30

Title: Timing issues from walking to idle?
Post by: Wayne Adams on Sun 12/04/2009 06:00:30
Why is there a random pause when my player character goes from walking to idle.. sometimes it's 4 seconds long, sometimes its about 2 seconds.. does AGS support some sort of stopping animation that plays between the walk and idle?

Thanks in advance for the assist.
:)
Title: Re: Clever animators out there:
Post by: EnterTheStory (aka tolworthy) on Sun 12/04/2009 09:52:24
Quote from: Wayne Adams on Sun 12/04/2009 06:00:30
Why is there a random pause when my player character goes from walking to idle.. sometimes it's 4 seconds long, sometimes its about 2 seconds.. does AGS support some sort of stopping animation that plays between the walk and idle?

Thanks in advance for the assist.
:)


Do any of your animations have frames that last 2 or 4 seconds long? If you stop at that frame, the character won't respond until the frame is complete. That used to happen to me all the time. Now I make sure than all my animation frames are less than one second.
Title: Re: Clever animators out there:
Post by: Wayne Adams on Sun 12/04/2009 10:05:15
if i click enough to keep the characters walk cycle going there is no break.. it is only when he stops that he freezes for a few moments before he plays idle animation.. it also does not freeze in the preview loops (walk or idle) it doesn't freeze the game why he pauses either.. it just seems like the game itself is slow to respond to switching the animation from walk to idle...
Title: Re: Clever animators out there:
Post by: EnterTheStory (aka tolworthy) on Sun 12/04/2009 14:13:17
The only serious speed problem I ever had was when I'd click on someone to talk and they'd wait a couple of seconds to respond. For me it was because I'd happened to click while the animation was on a frame (usually in their idling animation) that lasted several seconds. Beyond that I can't help. Sorry.
Title: Re: Timing issues from walking to idle?
Post by: Scummbuddy on Mon 13/04/2009 03:34:55
What have you set your "time before going into idle animation" set to for that character?
Title: Re: Timing issues from walking to idle?
Post by: Wayne Adams on Mon 13/04/2009 19:25:20
That's an option? ... lol.. ok.. so i guess i know how to fix this.. Thanks a lot SB
Title: Re: Timing issues from walking to idle?
Post by: Wayne Adams on Tue 14/04/2009 03:53:22
Ok.. SB.. where is that entry located in the editor?
couldn't find it under views or character....
Title: Re: Timing issues from walking to idle?
Post by: Scummbuddy on Tue 14/04/2009 04:46:02
SetIdleView
(Formerly known as SetCharacterIdle, which is now obsolete)

Character.SetIdleView(int idleview, int delay)

Changes the character's idle view to IDLEVIEW, with a timeout of DELAY seconds of inactivity before it is played. Inactivity is defined as when the character is not moving and not being animated.
Setting DELAY to 0 causes the idle view to be looped continuously when the character is not moving - this is useful when for example the character is swimming and they need to tread water when idle.

Pass IDLEVIEW as -1 to disable the idle view completely.

NOTE: The DELAY is actually relative to the game speed. Setting this to 1 means a one second delay at the default 40 fps, but if you have adjusted the game speed then the delay will be adjusted accordingly.

NOTE: Due to a quirk in AGS, you cannot set the Idle View to view 1. In the unlikely event that you created your idle view in View 1, you'll need to move it to another view number.

Example:

cEgo.SetIdleView(12, 30);

will change/set the character EGO's idle view to 12. The idle view will be played if the character is idle for 30 seconds.

---

The "IdleView" option allows you to set an idle animation for the character. To do this, create a new view, with one or more loops of the character idle (eg. smoking, reading a book, etc). Then, set the "Idle view" to this view number. If the player stands still for 20 seconds (you can change the timeout with the Character.SetIdleView script function), then the current loop from the idle view will be played.
Title: Re: Timing issues from walking to idle?
Post by: Wayne Adams on Tue 14/04/2009 04:55:37
so basically the wind always blows the characters loose garments around.. as soon as he is finished walking i set his static idle delay to zero so he instantly stands still after walking, and the animated wind billow animation plays...

now are you also saying i can create another idle loop that after say.. ten seconds he stretches then returns to his stand still pose..

the problem is that since the wind is constantly blowing.. the character will always animate in some shape or form...

Thanks for the assist, Scummbuddy.