Animate

From ActiveWiki

Jump to: navigation, search

The animate command assigns an animation to the object. It is by far the most complex and probably least understood action command. For this reason, the following help pages have been added to address specific uses of the animate command:

  • Application of a single texture
  • Applying a sequence of textures
  • Using the animate command as a timer

Contents

[edit] Usage

    animate [tag=tag] [mask OR nomask] object-name animation-name imagecount framecount framedelay [framelist] [global]

Note: [ ] denotes optional arguments.

[edit] Description

[edit] Tag

The optional tag argument specifies the tag number of the polygon on the object to which the animation is applied. If omitted, the animation is applied to every polygon on the object.

[edit] Mask

If mask is specified, the animation is masked, and Active Worlds will attempt to download and apply a corresponding mask file for each texture in the animation sequence. The nomask option explicitly specifies that textures applied by the animation are not to be masked. By default, animations are not masked.

By default, animations are now not masked. If you have an animation that uses mask files to apply transparency to parts of the textures involved, you must now explicitly specify the mask option or all textures in the animation will be applied unmasked.

[edit] Object Name

The object-name argument specifies the name of the object to apply the animation to. This argument must be specified. If the animation is to be applied to this object, specify the keyword me as the object name.

Object names are assigned via the name command. The Animate command always requires the use of an object name, and will therefore recognize the name me as meaning the object on which the command is found.

[edit] Animation Name

The animation-name argument specifies the base name of the textures to be used in the animation.

[edit] Imagecount

The imagecount argument specifies the total number of unique textures in the animation.

[edit] Framecount

The framecount argument specifies the total number of frames in the animation sequence. Note this does not have to be the same as imagecount since a given image can be used more than once in an animation sequence.

[edit] Framedelay

The framedelay argument specifies the time in milliseconds between each frame of the animation. Note that low numbers for the framedelay may cause the animation to drop frames in order to keep up on slower systems. A framedelay of 0 means animate at the same rate as the browser's current frame rate. The framedelay argument is a 64-bit integer (max value: 18446744073709551615)

[edit] Framelist

The optional framelist argument allows you to specify the order of images to be displayed in the animation. This argument must be specified if imagecount and framecount are different. The default frame list is 1 through imagecount.

[edit] Global

The optional global argument will cause triggers to initiate the command for all users have the object in view. Without it, the command will be triggered exclusively for the user who activates the trigger (bump, activate, adone). By default, commands are not global.

Historically the animate command has been used most often for the purpose of placing a single static texture on an object. Please consider using the more efficient texture command for this purpose.

Note that the animate and texture commands will not display textures predictably on objects which do not have UV texture values specified for the vertices of the object.

[edit] Examples

    create animate mask me jump 5 9 100 1 2 3 4 5 4 3 2 1, astop; activate astart off
  • This action triggers a 9-frame animation called "jump" when the object is clicked on. The animation runs at 10 frames per second (100 milliseconds between frames). Note that while there are 9 frames in the animation, there are only 5 images since the first four are reused again on the way back down. The texture files for this animation will be named jump1.jpg, jump2.jpg, up to jump5.jpg, and the mask files will be jump1m.zip, jump2m.zip, up through jump5m.zip. Note the use of the create trigger combined with the astop command in order to set up the animation and stop it at the first frame. The [[[activate]] trigger combined with the astart command tells the animation to start running when the object is clicked on.
Object Scripting

Triggers: CreateBumpActivateAdoneCollideSdoneEnter ZoneExit Zone

Commands: AddforceAddtorqueAnimateAstartAstopCameraColliderColltagColorCoronaEnviExamineFrameGroupLightLinkLockMatfxMediaMidiMoveNameNoisePictureRotateSayScale SeqShadowSignSolidSoundTagTeleport / TeleportxTextureURLVelocityVisibleWarpWeb

Personal tools
In other languages