Difference between revisions of "LlSetTextureAnim"

From Second Life Wiki
Jump to navigation Jump to search
Line 20: Line 20:
*You cannot combine ROTATE and SCALE
*You cannot combine ROTATE and SCALE
*'''sizex''' & '''sizey''' are both limited to a range of 0 to 255
*'''sizex''' & '''sizey''' are both limited to a range of 0 to 255
|constants={{{!}} {{Prettytable}}
|constants={{{!}} class="sortable collapsible" {{Prettytable}}
{{!}}-{{Hl2}}
{{!}}-{{Hl2}}
! colspan="2" {{!}}Modes
! Modes
! Description
!
!class="unsortable"{{!}}Description
{{!}}-
{{!}}-
{{!}}[[ANIM_ON]]
{{!}}[[ANIM_ON]]
{{!}}{{LSL Hex||1}}
{{!}}{{LSL Hex||1|chars=2}}
{{!}}Texture animation is on.
{{!}}Texture animation is on.
{{!}}-
{{!}}-
{{!}}[[LOOP]]
{{!}}[[LOOP]]
{{!}}{{LSL Hex||2}}
{{!}}{{LSL Hex||2|chars=2}}
{{!}}Loop the texture animation.
{{!}}Loop the texture animation.
{{!}}-
{{!}}-
{{!}}[[REVERSE]]
{{!}}[[REVERSE]]
{{!}}{{LSL Hex||4}}
{{!}}{{LSL Hex||4|chars=2}}
{{!}}Play animation in reverse direction.
{{!}}Play animation in reverse direction.
{{!}}-
{{!}}-
{{!}}[[PING_PONG]]
{{!}}[[PING_PONG]]
{{!}}{{LSL Hex||8}}
{{!}}{{LSL Hex||8|chars=2}}
{{!}}Play animation going forwards, then backwards.
{{!}}Play animation going forwards, then backwards.
{{!}}-
{{!}}-
{{!}}[[SMOOTH]]
{{!}}[[SMOOTH]]
{{!}}{{LSL Hex||16}}
{{!}}{{LSL Hex||16|chars=2}}
{{!}}Slide in the X direction, instead of playing separate frames.<br/>In both [[SCALE]] and [[ROTATE]] modes, causes smooth transitions.
{{!}}Slide in the X direction, instead of playing separate frames.<br/>In both [[SCALE]] and [[ROTATE]] modes, causes smooth transitions.
{{!}}-
{{!}}-
{{!}}[[ROTATE]]
{{!}}[[ROTATE]]
{{!}}{{LSL Hex||32}}
{{!}}{{LSL Hex||32|chars=2}}
{{!}}Animate texture rotation.<br>Does not work with [[SCALE]]
{{!}}Animate texture rotation.<br>Does not work with [[SCALE]]
{{!}}-
{{!}}-
{{!}}[[SCALE]]
{{!}}[[SCALE]]
{{!}}{{LSL Hex||64}}
{{!}}{{LSL Hex||64|chars=2}}
{{!}}Animate the texture scale.<br>Does not work with [[ROTATE]]
{{!}}Animate the texture scale.<br>Does not work with [[ROTATE]]
{{!}}}
{{!}}}

Revision as of 16:45, 14 July 2007

Summary

Function: llSetTextureAnim( integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate );
0.0 Forced Delay
10.0 Energy

Animate the texture on the specified face/faces by setting the texture scale and offset

• integer mode mask of Mode flags
• integer face face number or ALL_SIDES
• integer sizex horizontal frames (ignored for ROTATE and SCALE)
• integer sizey vertical frames (ignored for ROTATE and SCALE)
• float start Start position/frame number (or radians for ROTATE)
• float length number of frames to display (or radians for ROTATE)
• float rate frames per second (must not be zero)

start supports negative indexes. If face is ALL_SIDES then the function works on all sides. Frames are numbered from left to right, top to bottom, starting at 0.
If rate is negative, has the same effect as using the REVERSE flag.

Modes Description
ANIM_ON 0x01 Texture animation is on.
LOOP 0x02 Loop the texture animation.
REVERSE 0x04 Play animation in reverse direction.
PING_PONG 0x08 Play animation going forwards, then backwards.
SMOOTH 0x10 Slide in the X direction, instead of playing separate frames.
In both SCALE and ROTATE modes, causes smooth transitions.
ROTATE 0x20 Animate texture rotation.
Does not work with SCALE
SCALE 0x40 Animate the texture scale.
Does not work with ROTATE

Caveats

  • If start is out of bounds the script continues to execute without an error message.
  • The function silently fails if its face value indicates a face that does not exist.
  • You can only have one texture animation on a prim
    • Calling llSetTextureAnim more than once on a prim will reset it.
  • You cannot combine ROTATE and SCALE
  • sizex & sizey are both limited to a range of 0 to 255

Examples

See Also

Articles

•  Negative Index

Deep Notes

Signature

function void llSetTextureAnim( integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate );