Jump to content
You are about to reply to a thread that has been inactive for 106 days.

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

Recommended Posts

Posted

I need a script that animates the texture to move over the surface, if the Avatar is walking or running. I tried it with some pieces, but so far it does not work: 

 

key owner;

default
{
    on_rez(integer start_param)
    {
        llResetScript();
    }

    changed(integer change)
    {
        if (change & (CHANGED_OWNER | CHANGED_INVENTORY))
            llResetScript();
    }

    state_entry()
    {
        owner = llGetOwner();
        llSetTimerEvent(1.0);
    }

    timer()
    {
        integer ownerInfo = llGetAgentInfo(owner);

        if(ownerInfo & AGENT_WALKING)
            llSetTextureAnim((float)FALSE, ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 1.0, 1.0, 1.0);
        else
        
           llSetTextureAnim((float)TRUE, ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 1.0, 1.0, 1.0);
           
    }
}

 

The result at the moment is: function call mismatches type or number of arguments in the third last line: 

llSetTextureAnim((float)FALSE, ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 1.0, 1.0, 1.0);

But I guess the last line will also not work. Can somebody help?

 

 

 

Posted

Some notes From https://wiki.secondlife.com/wiki/LlSetTextureAnim:

1. You shouldn't pass "TRUE" as the first parameter if you are not turning the animation "off". You just pass the Boolean flag parameters..

2. Similarly, if you are turning the animation "off" with "FALSE", you don't pass the Boolean flag parameters, you should just pass "FALSE".

3. Also: There's no reason to convert the first parameter to a "float" if you are passing FALSE.

* I believe your first call may be intended as:

llSetTextureAnim(FALSE, ALL_SIDES, 1, 1, 1.0, 1.0, 1.0);

And your second call may be intended as: 

llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 1.0, 1.0, 1.0);

* Note that in the Wiki it says:

This turns off all texture animations

llSetTextureAnim(FALSE, ALL_SIDES, 0, 0, 0.0, 0.0, 1.0);

So possibly change those parameters after ALL_SIDES accordingly for the first call. (This may not be needed if the other parameters are ignored when "FALSE" is the first parameter.)

 

  • Like 1
You are about to reply to a thread that has been inactive for 106 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
×
×
  • Create New...