spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Character functions and properties

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.

User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.