Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "ANIM"

From Creatures Wiki
Jump to navigation Jump to search
m
 
(20 intermediate revisions by 8 users not shown)
Line 1: Line 1:
This sets the animation string of the agent.
+
'''ANIM''' is a [[CAOS]] command used to animate an agent.
  
anim [0 1 2 4 5 8 14 12 1 0 1]
+
==Usage==
 +
Syntax: ''ANIM [frames(ints) 255(optional) restart(int optional)]''
  
will make the agent anim following the numbers... which are the identifiers of the images in the c16 file
+
Standalone command.
  
anim [0 1 2 3 255]
+
Starts an animation sequence based on ''frames'', displaying the frame number specified for [[FRAT]] ticks (defaulting to 1), then moving on to the next number. 255 sends the animation back to ''restart'', which is an index in the sequence. If ''restart'' is not specified, it defaults to 0, i.e. the first number in the sequence.
  
Will make the agent loop on this animation.
+
The integer ''restart'' and the integers in ''frames'' are all relative to [[BASE]] if that is set.
  
anim [1 1 1 1 2 2 2 2 2 3 3 3 3 3 ]
+
If in one of the NEW: commands, such as [[NEW:SIMP]], the coder sets it to a non-0 number, that number is then considered as 0 for the ANIM command as the base has shifted.
  
Will make the agent use more than once each image, this way the animation will be slower
+
==Examples==
[[Category:C3 CAOS Commands]]
+
''ANIM'' being used to animate frames 1-10:
 +
<pre>
 +
ANIM [1 2 3 4 5 6 7 8 9 10]
 +
</pre>
 +
 
 +
Being used to loop frames 0-5:
 +
<pre>
 +
ANIM [0 1 2 3 4 5 255]
 +
</pre>
 +
 
 +
Being used to animate frames 1-10, then loop from 7 (which is the 6th pose listed, counting from 0):
 +
<pre>
 +
ANIM [1 2 3 4 5 6 7 8 9 10 255 6]
 +
</pre>
 +
 
 +
You can use ''ANIM []'' to halt an animation in progress. This has the same effect as ''POSE POSE''.
 +
 
 +
==See also==
 +
*[[BASE]]
 +
*[[ANMS]] sets an animation with a string
 +
*[[POSE]] can cancel or check the progress of an animation
 +
*[[OVER]] can make sure that the whole animation is played before the script progresses
 +
*[[Cob tutorial five - Fireworks]]
 +
*[[Making a Toy for C3]]
 +
 
 +
==External links==
 +
*[https://web.archive.org/web/20050312041640/http://www.freewebs.com/alimaggs/creaturesdev/cdn/c2/knowledge/cspecifics/c2_cspecifics6.html Tutorial on Animation and Movement in Creatures 2]
 +
 
 +
[[Category:C1 CAOS Commands]]
 +
[[Category:C2 CAOS Commands]]
 +
[[category:C3 CAOS Commands]]

Latest revision as of 23:18, 12 September 2022

ANIM is a CAOS command used to animate an agent.

Usage[edit]

Syntax: ANIM [frames(ints) 255(optional) restart(int optional)]

Standalone command.

Starts an animation sequence based on frames, displaying the frame number specified for FRAT ticks (defaulting to 1), then moving on to the next number. 255 sends the animation back to restart, which is an index in the sequence. If restart is not specified, it defaults to 0, i.e. the first number in the sequence.

The integer restart and the integers in frames are all relative to BASE if that is set.

If in one of the NEW: commands, such as NEW:SIMP, the coder sets it to a non-0 number, that number is then considered as 0 for the ANIM command as the base has shifted.

Examples[edit]

ANIM being used to animate frames 1-10:

ANIM [1 2 3 4 5 6 7 8 9 10]

Being used to loop frames 0-5:

ANIM [0 1 2 3 4 5 255]

Being used to animate frames 1-10, then loop from 7 (which is the 6th pose listed, counting from 0):

ANIM [1 2 3 4 5 6 7 8 9 10 255 6]

You can use ANIM [] to halt an animation in progress. This has the same effect as POSE POSE.

See also[edit]

External links[edit]