Jump to content

On/Off Addition For Animated Texture.


hamsterstyle
 Share

You are about to reply to a thread that has been inactive for 3701 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts


default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | LOOP, ALL_SIDES, 4,8,0,0,12);
}
}

 

 - this script i have been using in my animated pictures/frames. it works fine.

 - i want to add an on/off touch switch to it, though i havent the faintest idea of how to do that.

 

 - Note: Anyone can touch and trigger the on and off. The default static image to be the last cell of a 32 cell texture. No announcements like "Im On Now" Or "Now Off" ect.

 

 - any help would be appreicated.

Link to comment
Share on other sites

Something akin to...

 

touch_start(integer num)

{

llSetTextureAnim(FALSE | LOOP, ALL_SIDES, 4,8,0.0,0,1.0);

}

 

you can then try setting the freezframe by putting the frame number in place of the 0.0 in the middle (start value)

or alternatively set it with llSetPrimitiveParams

 

Link to comment
Share on other sites

 - Thanks for the help guys. Much appricated.

 

LepreKaun, what you directed me to i looked at previously, but i was unsure if i had to add this to the current script or ..

 

 - that script alone is exactly what i wanted. I just have to play around with it to try and get the static image on the frame i want.

 

 - Thank you again.

Link to comment
Share on other sites

Yes, the SMOOTH transformation at first may not appear to be what you want until one realizes what happens when it is constrained to just one frame. The benefit of using this approach is not having to do the x-y offset calculations to show the frame you want, which can be a pain.

 

Just keep in mind that frame numbering begins at 0.0, so your last frame in a 4x8 tile set is 31.0.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3701 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...