Jump to content
WESTCAT

AVsitter Auto Play2

Recommended Posts

HI;

 

I have found two different AutoPlay scripts. one with a *in the front of it when placed in the Content folder of the object and one without;

i.e.

with the "*" 

*autoplay 

/******************************************************************
* Automatically plays COUPLES_POSE when 2 avatars sit.
* Optionally plays SINGLES_POSE when one avatar stands.
* Requires scripts from box 2.1-11.01 or later.
******************************************************************/

string COUPLES_POSE = "Couples1";
string SINGLES_POSE = ""; //can leave empty

/******************************************************************
 * DON'T EDIT BELOW THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
******************************************************************/

integer IS_SYNC;

default{
   changed(integer change){
        if(change & CHANGED_LINK){
            llSleep(1);
            integer avatar_count = llGetNumberOfPrims() - llGetObjectPrimCount(llGetKey());
            if(avatar_count>1){ // more than one avatar sitting
                if(!IS_SYNC){ // initial avatar had not selected a SYNC pose 
                    llMessageLinked(LINK_SET,90000,COUPLES_POSE,""); // play couples pose
                }
            }
            else if(SINGLES_POSE){
                llMessageLinked(LINK_SET,90000,SINGLES_POSE,""); // play singles pose
            }
        }
    }
    link_message(integer sender, integer num, string msg, key id){
        if(num==90045){
            // Extract the data into a list
            list data = llParseStringKeepNulls(msg,["|"],[]);
            // TRUE if the pose is a SYNC pose
            IS_SYNC = (integer)llList2String(data,6);
        }
    }
}
 

AND the one with out the *,   just  Autoplay

/******************************************************************
* This example automatically plays a pose when 2 avatars sit
* and a different pose when one avatar stands.
******************************************************************/

string SINGLES_POSE = "Standby";
string COUPLES_POSE = "Sequence"; 

default{
   changed(integer change){
        if(change & CHANGED_LINK){
            llSleep(1);
            integer count_avatars = llGetNumberOfPrims();
            while (llGetAgentSize(llGetLinkKey(count_avatars)) != ZERO_VECTOR){ // prim is an avatar!
                count_avatars--;
            }
            if(llGetNumberOfPrims()-count_avatars>1){
                llMessageLinked(LINK_SET,90000,COUPLES_POSE,"");
            }
            else{
                llMessageLinked(LINK_SET,90000,SINGLES_POSE,"");
            }
        }
    }
}

 

Basically I want one that will work with the more detailed sequence setup in AVSitter2.

 

Per https://avsitter.com/#animationsequences 

Animation Sequences

AVsitter provides two ways to do sequences: the AVsequence™ script and the "built-in" sequence method. Read about both and use the method most appropriate for your situation.

 

I would prefer to use the more sophisticated AVsequence system as opposed to the built in method.  But so far I can only get the Autoplay to work with the "Built in sequence" method.

Is there a way to get the Autoplay to work with the more detailed AVsequence system?

I would prefer the later as the positions of my dance and sport animations changed a bit with each sequenced animation and the "built in method" does not allow you to change the position from animation to animation in the sequence.   

and yes I tried the AVsitter group over the past couple of months with no real feedback, the Q and A page also appears to be abandoned. 

thank you 

 

Jane

 

 

Share this post


Link to post
Share on other sites

i havent had a play with it myself but could try doing it with the notecard commands and see how you get on

something bare bones to get started with like in AVpos notecard:

SEQUENCE MyAutoDances

SYNC MyAutoDances | <default animation name>

and thats all

then in Contents is the AVSequence notecard named MyAutoDances and the AVSequence script in addition to the AVpos scripts

 

 

Edited by ellestones
pos

Share this post


Link to post
Share on other sites
14 hours ago, WESTCAT said:

I would prefer to use the more sophisticated AVsequence system as opposed to the built in method.  But so far I can only get the Autoplay to work with the "Built in sequence" method.

Everything AVsitter that is configured in any way is done through the AVpos notecard. Though this AutoPlay script looks like an aftermarket script (not part of the official AVsitter system, but an add-on).

In this case, the section where you name the poses:

Quote

string COUPLES_POSE = "Couples1";
string SINGLES_POSE = ""; //can leave empty

 

"Couples1" will be the name of the SYNC pose in the AVpos notecard, not the animation name. The same for the Singles pose but it will be a POSE name.

In @ellestones example: SYNC MyAutoDances | <default animation name> - the pose name in this case is "MyAutoDances" - so your script would look like:

string COUPLES_POSE = "MyAutoDances";

Make sense? I don't know if this is the case, though I do know AVsitter inside and out for years and this makes the most sense to me.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×