Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Mon 25/02/2013 20:06:17

Title: SOLVED: Idle View Animation Delay
Post by: on Mon 25/02/2013 20:06:17
Hi guys!
Simple question, but I didnt find the answer on the internet.
I've set a idle view for a sleeping charakter. it works fine, start at the proper time etc. pp. BUT its much too fast. It looks like he is hyperventilating :D

So I would like to know what I have to type in the script that I can set the idle animation delay..

Thanks!!!
Title: Re: Idle View Animation Delay
Post by: Crimson Wizard on Mon 25/02/2013 21:01:23
Character.SetIdleView(int idleview, int delay).
http://www.adventuregamestudio.co.uk/wiki/Character_functions_and_properties#Character.SetIdleView
Title: Re: Idle View Animation Delay
Post by: Slasher on Mon 25/02/2013 21:18:34
He may be talking about animation delay of idle view and not when idle starts?

Idle view is hard-coded.

So, you could adjust players idle view frames delay and make sure you have enough frames to cover the idle time you require at a good speed so it looks perfick.

Title: Re: Idle View Animation Delay
Post by: on Mon 25/02/2013 21:30:21

Yes I (she :wink:) am talking about the animation delay. The idle view starts perfectly fine and the right time.

The thing is, i guess the animation delay is set to 5 by default or something around that. I would need at least 25, as I tested in the preview, so it doesnt look stupid..

How do I adjust the idle view frames delay? Its not as an option in the charakters setting, there you only have the speech animation delay..?

I have no clue :) :confused:
Title: Re: Idle View Animation Delay
Post by: Khris on Mon 25/02/2013 21:35:21
You can specify an additional delay for each frame in the View editor. I'm not sure it'll work with idle views but it's worth a try.
Title: Re: Idle View Animation Delay
Post by: Slasher on Mon 25/02/2013 21:38:52
Adjust idle view frames.

Go to the view you have set as the players idle view. Click on frame 0 and in the events panel, on the right, you will see 'Delay', 5 seems the default, do this for each frame if required.

Anyhow, if you want to make idle view last longer you could replicate the frames to make it longer. Depends on what the idle animation is suppose to be.

The ldle view is read only. As Khris said, it may work for idle view.

I believe Khris wrote an idleidle module some time back.

Edit: CRIMSON:  I meant animation delay for idle view in script.

Title: Re: Idle View Animation Delay
Post by: Crimson Wizard on Mon 25/02/2013 21:43:55
Oh, right, I misread the question... again. :(

Yes, ofcourse, adjusting delays for each frame in the editor should work for idle view too. It should work for any view, I believe.

Quote from: slasher on Mon 25/02/2013 21:38:52
The ldle view is read only.
Not sure what you mean by this. You can change it runtime using the function I referenced in my first post above (Character.SetIdleView).
Title: Re: Idle View Animation Delay
Post by: on Mon 25/02/2013 21:54:10

Yeaaaaah!

Thank you very much, I just figgured it out myself and wanted to post it, but you were faster :) :shocked:
How could I be so blind? I fast fixed on the characters site, and not on the views.. anyhow.

Thanks again, and SOLVED :)
Title: Re: Idle View Animation Delay
Post by: Slasher on Mon 25/02/2013 21:58:32
If you mean in the characters pane then you may have, or may not have, delay problems for normal views.

Anyhow, good luck.
Title: Re: Idle View Animation Delay
Post by: VVK on Mon 25/02/2013 23:32:13
I found the answer to a similar issue here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=36779.msg483049#msg483049 - It's old, but what's said seems to still be true.

Setting the delay for each frame of the idle view so as to compensate for the speed being character's Animation Speed +5 worked for me, but it takes a lot of clicking when there are a lot of frames.

Thesie, I'm not sure what you're saying you did. If you found another way that works, can you explain?
Title: Re: Idle View Animation Delay
Post by: Khris on Mon 25/02/2013 23:42:09
There's no other way; I believe Thesie is saying she was looking for a way to do this in the Character functions and didn't realize she could alter the view itself.
Title: Re: Idle View Animation Delay
Post by: VVK on Mon 25/02/2013 23:46:20
Oh, okay. Thanks for the information and clarification. I'm not surprised, though - I spent a while trying to figure it out a while ago, and this did seem like the only way.
Title: Re: Idle View Animation Delay
Post by: on Sun 03/03/2013 14:41:38

Yes, like Khris said, I didnt know about the option and that worked for me.
Although you are right, VVK, it takes a lot of clicking  :wink:
Title: Re: Idle View Animation Delay
Post by: Filipe on Sun 17/02/2019 19:26:44
Quote from: Khris on Mon 25/02/2013 23:42:09
There's no other way; I believe Thesie is saying she was looking for a way to do this in the Character functions and didn't realize she could alter the view itself.

I know this is an hold post, but it helped me a lot.

I have 3 idle views for the same character, view number 4, 5, and 6. I was wondering If I could randomly set the idle view to a specific value between view, 4, and 6 (this interval). So that the Idle view wasn't always the same... sometimes the character seat on the floor, other he yawn, etc...

How do I do it in c++? Can someone help me?

Character.SetIdleView(int idleview, int delay)

int idleview= random number between 4 and 6....

Thanks :)


Title: Re: SOLVED: Idle View Animation Delay
Post by: Khris on Sun 17/02/2019 21:18:51
This should work:
Code (ags) Select
  Character.SetIdleView(Random(2) + 4, delay);
Title: Re: SOLVED: Idle View Animation Delay
Post by: Filipe on Sun 17/02/2019 22:00:29
Thanks  Khris :)... Thanks to you and all the guys in this forum :)

This forum rocks baby!!!!  :grin: