Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: zeta_san on Sun 23/08/2020 08:10:44

Title: start viewidle .. how to set idle time? [SOLVED]
Post by: zeta_san on Sun 23/08/2020 08:10:44
Good morning friends
is it possible to set the start time of the viewidle?

example
viewidle starts after 5, 3 or 7 minutes of inactivity (always)

otherwise I create a function that I call when needed
Title: Re: start viewidle .. how to set idle time?
Post by: Laura Hunt on Sun 23/08/2020 08:24:28
It's right there in the manual:

QuoteCharacter.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.
Title: Re: start viewidle .. how to set idle time?
Post by: zeta_san on Sun 23/08/2020 08:36:16
yes sure, but must be set every time or is it an absolute command?
Title: Re: start viewidle .. how to set idle time?
Post by: Slasher on Sun 23/08/2020 08:38:01
Once you set character idle view it stays..You can do this in the script..

As Laura Hunt shows, you set the timer in script.
Title: Re: start viewidle .. how to set idle time?
Post by: zeta_san on Sun 23/08/2020 08:44:54
but i can't find the command line where i can set character idle time before animation starts
Title: Re: start viewidle .. how to set idle time?
Post by: Slasher on Sun 23/08/2020 08:48:27
Quote from: zeta_san on Sun 23/08/2020 08:44:54
but i can't find the command line where i can set character idle time before animation starts

Do you only want it to do an idle at certain times?

Otherwise add to Room Load...
Title: Re: start viewidle .. how to set idle time?
Post by: zeta_san on Sun 23/08/2020 08:56:03
Quote from: Slasher on Sun 23/08/2020 08:48:27
Quote from: zeta_san on Sun 23/08/2020 08:44:54
but i can't find the command line where i can set character idle time before animation starts

Do you only want it to do an idle at certain times?

it is sufficient for the animation to start approximately after 60 seconds of inactivity
Title: Re: start viewidle .. how to set idle time?
Post by: Slasher on Sun 23/08/2020 09:03:20
It depends what delay you want.. experiment with delay until you are happy...
Title: Re: start viewidle .. how to set idle time?
Post by: zeta_san on Sun 23/08/2020 09:08:51
the problem is that I can't find the line to act on

then if I have to set it from time to time .. it doesn't solve the problem

I wish I could choose an absolute value for everything
Title: Re: start viewidle .. how to set idle time?
Post by: Slasher on Sun 23/08/2020 09:23:08
Ok...  so, at what points in the game would this idle view come into play?

The idle view can be change any time...
Title: Re: start viewidle .. how to set idle time?
Post by: zeta_san on Sun 23/08/2020 09:33:12
therefore

- I created the character

- I created

sight walking
sight thinking
sight speak
view inactivity

I set them up
I assigned them

what I would like is for the animation to start after 60 seconds of inactivity and not after 20

every time 60 seconds have passed since the last time he interacted. always.
Title: Re: start viewidle .. how to set idle time?
Post by: Laura Hunt on Sun 23/08/2020 09:56:27
Quote from: zeta_san on Sun 23/08/2020 08:44:54
but i can't find the command line where i can set character idle time before animation starts

Just put the SetIdleView command inside the game_start() function in your Global Script.
Title: Re: start viewidle .. how to set idle time?
Post by: zeta_san on Sun 23/08/2020 10:25:50
the winner is
Quote from: Laura Hunt on Sun 23/08/2020 09:56:27
Global Script.