Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer iDIRECTION_POSITIVE = FALSE; //set this to TRUE or FALSE if you want to swap directions from negative to positive animation-direction, according.
- float fStepwidth = 0.01;
- float fStep = 0.0;
- integer link = LINK_THIS;
- integer face = ALL_SIDES;
- string texture = "5baee477-ea6d-bd2e-c213-c99a4393796f"; //put texture key here
- vector repeats = <1.0, 1.0, 0.0>;
- float fSleep = 0.02;
- float fRotation = 0.0;
- integer iANIMATE_X = TRUE; //set this to TRUE or FALSE, if you want to animate along the X-axis or the Y axis, according.
- default
- {
- state_entry()
- {
- llSetTimerEvent(fSleep);
- }
- timer()
- {
- vector vOffset = <fStep, 0.0, 0.0>;
- if (iANIMATE_X == FALSE)
- {
- vOffset = <0.0, fStep, 0.0>;
- }
- llSetLinkPrimitiveParamsFast(link,
- [ PRIM_TEXTURE, face, texture, repeats, vOffset, fRotation ]);
- if (iDIRECTION_POSITIVE)
- {
- fStep = fStep + fStepwidth;
- if (fStep > 1.0)
- {
- fStep = 0.0;
- }
- }
- else
- {
- fStep = fStep - fStepwidth;
- if (fStep < 0.0)
- {
- fStep = 1.0;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement