To be clear i mean the below script can i put 2 scripts for example one for sitter 0 and another for sitter 1 in the same script file.
and should i put the script file in the Prim or in the Prop (i put it in Prim but just to confirm that this is the right place)
/******************************************************************
* This example uses 90200 to rez a prop while any one of a number of poses are playing.
* Props remain until a different pose is selected or another prop of same prop group is rezzed.
* Useful if you want the same prop to remain rezzed for several poses.
* May help save prop script memory in cases you are re-using the same prop over and over.
*
* To use:
* 1. Set up a regular prop that rezzes with a pose as usual.
*
* 2. Change the PROP's <trigger_name> in the notecard to be a completely new name.
* The new name should *NOT* match a pose name so the prop will rez *ONLY* by this script.
* e.g. PROP PicnicProp...
*
* 3. Edit the "prop_trigger" string below to match this name.
* e.g. string prop_trigger = "PicnicProp";
*
* 4. Edit "poses" list below to include all the POSE or SYNC that you want to rez the prop for.
*
* 5. Edit "SITTER" below to match the sitter # the props are for (or use -1 to ignore sitter #).
*
* If multiple copies of this script are used to rez multiple props at the same time, then each PROP should be set to a different "GROUP".
******************************************************************/
string prop_trigger = "PicnicProp";
list poses = ["Sit1","Sit2","cuddle","kiss"];
integer SITTER = 0;
/******************************************************************
* DON'T EDIT BELOW THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
******************************************************************/
integer rezzed;
default{
link_message(integer sender, integer num, string msg, key id){
if(num==90045){
list data = llParseStringKeepNulls(msg,["|"],[]);
string POSE_NAME = llList2String(data,1);
integer SITTER_NUMBER = (integer)llList2String(data,0);
if(SITTER_NUMBER==SITTER || SITTER==-1){
if(llListFindList(poses,[POSE_NAME])!=-1){
if(rezzed==FALSE){
llMessageLinked(LINK_THIS,90200,prop_trigger,"");
rezzed=TRUE;
}
}
else{
llMessageLinked(LINK_THIS,90200,"remprop_"+prop_trigger,""); // clear the prop
rezzed=FALSE;
}
}
}
else if((num==90065 && (integer)msg==SITTER) || num==90030){ //sitter stands or swaps
rezzed=FALSE;
}
}
}