Jump to content

AVsitter Auto Play2


WESTCAT
 Share

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

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

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

 

 

Link to comment
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
  • Thanks 1
Link to comment
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
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
On 11/5/2018 at 8:13 AM, Alyona Su said:

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:

"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.

Thanks all, finally figured it out, I can even do it by groups now but via a HUD.  For example in the full Auto, I now have made two pads.  with both a single AV can sit and just do a slow jive, then when the other sits, they start into the auto sequence and it keeps looping until one stands.  I even tweeked it and got it to work with two of my Bots.   I order one bot to sit on it, then the other bot comes along wither by the Smart Bots route script or by my command and they both start dancing and loop through around 12 songs/dances, I even figures out how to add expressions.   With the HUD version you can select looped specific animation sequences.  You can still dance with a bot but one has to be able to run the HUD...   thanks again to all those who tried to help.   :)

Link to comment
Share on other sites

On 11/5/2018 at 3:10 AM, ellestones said:

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

 

 

Ya I was over complicating things.  My Husband helped straighten me out. I can even get two bots now to auto dance together on a loop or around 12 repeating dances.  

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1978 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...