(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.
|