This guide is for approved SedSens creators who use AVsitter in furniture. It explains how an adapter script can translate AVsitter sitter, pose, and button events into ordered SedSens Creator API commands.
Required Components
- A working AVsitter setup with its AVpos notecard.
- The SedSens Creator API script in a prim created by the licensed creator.
- A SedSens AVsitter adapter script in the same linkset.
- The centralized SedSens Prop Type Key for each supported action.
The furniture owner, menu operator, sitter, and Suit wearer do not need a Creator API license. The Creator API license belongs to the approved creator of the prim containing the script.
Link Message Ranges
AVsitter: 90000 through 90500
SedSens command: 7337
SedSens reply: 7367
Example adapter menu: 7336
The ranges do not conflict. The adapter example uses 7336 for AVpos buttons and reserves 7337 and 7367 for the Creator API.
Relevant AVsitter Messages
90045 A pose has started
90060 An avatar has seated
90065 A sitter has stood
90050 A pose was selected from a menu
Use 90045 for pose-driven effects. It confirms that the pose actually started and supplies the affected avatar UUID.
Use 90065 to clear the SedSens target when the active sitter stands. Message 90050 describes a menu selection, but it is not as reliable as 90045 for confirming that an effect should occur.
Recommended Command Sequence
1. SET_TARGET_MODE with SEATED
2. Wait for OK
3. SET_PROP with the Prop Type Key
4. Wait for OK
5. SET_TARGET with the sitter UUID
6. Wait for OK
7. HIT with bodyPart,hitLevel,optionalAlphaHits
8. CLEAR_TARGET when the sitter stands or the scene ends
The Creator API processes asynchronous web and Suit requests. Do not send the complete sequence at once. The adapter must wait for the reply on 7367 before sending the next command. A command sent while another operation is active receives BUSY.
Button-Driven AVpos Setup
An AVpos BUTTON can send a custom integer, custom string, and avatar UUID to the adapter.
BUTTON Spank|7336|spank,b1,1
BUTTON Hard Spank|7336|spank,b1,3,2
BUTTON Scratch|7336|scratch,al2,2
The payload format is propTypeKey,bodyPart,hitLevel,optionalAlphaHits.
When no custom key is supplied, AVsitter places the menu avatar UUID in the link message key field. In normal sitter-controlled furniture, that UUID becomes the SedSens target.
AVcontrol
AVcontrol can provide a controller UUID and sitter UUID separated by a pipe character. The adapter must use the controller only for menu ownership and use the sitter UUID as the SedSens target. It must never apply an effect to the controller merely because the controller opened the menu.
Adapter Example
integer AV_BUTTON = 7336;
integer SEDSENS_SEND = 7337;
integer SEDSENS_REPLY = 7367;
string pendingProp;
string pendingHit;
key pendingTarget;
key activeTarget;
string pendingStep;
sendApi(string command, string param)
{
llMessageLinked(LINK_SET, SEDSENS_SEND, command, param);
}
key targetFromAvsitter(key id)
{
list keys = llParseStringKeepNulls((string)id, ["|"], []);
integer count = llGetListLength(keys);
if (count > 1) return (key)llList2String(keys, count - 1);
return id;
}
beginEffect(string payload, key id)
{
if (pendingStep != "") return;
list values = llParseStringKeepNulls(payload, [","], []);
pendingProp = llStringTrim(llList2String(values, 0), STRING_TRIM);
string bodyPart = llStringTrim(llList2String(values, 1), STRING_TRIM);
string hitLevel = llStringTrim(llList2String(values, 2), STRING_TRIM);
string alphaHits = llStringTrim(llList2String(values, 3), STRING_TRIM);
pendingTarget = targetFromAvsitter(id);
if (pendingProp == "" || bodyPart == "" || hitLevel == "" || pendingTarget == NULL_KEY)
{
pendingProp = "";
pendingTarget = NULL_KEY;
return;
}
pendingHit = bodyPart + "," + hitLevel;
if (alphaHits != "") pendingHit += "," + alphaHits;
pendingStep = "SET_TARGET_MODE";
sendApi("SET_TARGET_MODE", "SEATED");
}
clearPending()
{
pendingProp = "";
pendingHit = "";
pendingTarget = NULL_KEY;
pendingStep = "";
}
default
{
link_message(integer sender, integer number, string message, key id)
{
if (number == AV_BUTTON)
{
beginEffect(message, id);
return;
}
if (number == 90065)
{
key standingAvatar = id;
if (standingAvatar == activeTarget)
{
sendApi("CLEAR_TARGET", "");
activeTarget = NULL_KEY;
}
return;
}
if (number != SEDSENS_REPLY || message != pendingStep) return;
list reply = llParseStringKeepNulls((string)id, ["|"], []);
string status = llList2String(reply, 0);
if (status != "OK")
{
llOwnerSay("SedSens " + message + " failed: " + (string)id);
clearPending();
return;
}
if (pendingStep == "SET_TARGET_MODE")
{
pendingStep = "SET_PROP";
sendApi("SET_PROP", pendingProp);
}
else if (pendingStep == "SET_PROP")
{
pendingStep = "SET_TARGET";
sendApi("SET_TARGET", (string)pendingTarget);
}
else if (pendingStep == "SET_TARGET")
{
activeTarget = pendingTarget;
pendingStep = "HIT";
sendApi("HIT", pendingHit);
}
else if (pendingStep == "HIT")
{
clearPending();
}
}
}
Pose-Driven Integration
For effects tied to poses, listen for AVsitter message 90045. Parse the pipe-separated message, map the pose name to a SedSens payload, and call the same ordered adapter workflow.
if (number == 90045)
{
list poseData = llParseStringKeepNulls(message, ["|"], []);
string poseName = llList2String(poseData, 1);
if (poseName == "Over Knee Spank")
{
beginEffect("spank,b1,2", id);
}
}
For a SYNC pose, map only the sitter who should receive the SedSens effect. Do not target every avatar merely because their UUID appears in the all-sitters field.
Body Parts and Hit Levels
Use the Creator API BODY_PARTS command to retrieve supported body location keys. Do not hardcode an undocumented body location. Hit level and optional alpha hits must match the intended Prop behavior.
Target Rules
SEATEDis the normal AVsitter furniture mode.- The selected target must be seated on the same furniture linkset.
- The target must be nearby and wearing a responsive SedSens Suit.
- The menu operator may stand nearby, but the operator is not automatically the target.
- The Creator API rechecks target eligibility before each hit.
DEVICEis only for products intentionally operated without sitting.
Troubleshooting
BUSY Wait for the current 7367 reply before sending another command
BAD_PROP Confirm the centralized SedSens Prop Type Key
BAD_TARGET Confirm that the adapter supplied an avatar UUID
DNF Confirm that the avatar is nearby
NOT_SEATED Confirm that the target is seated on this furniture linkset
TARGET_INVALID The target stood, moved away, or no longer qualifies
TIMEOUT The selected Suit did not answer
NO_PROP SET_PROP did not complete before HIT
NO_TARGET SET_TARGET did not complete before HIT
Testing Checklist
- Test one sitter using a Suit and one AVpos button.
- Confirm the correct Prop Type, body part, and hit level.
- Confirm that a nearby non-sitter cannot be targeted in
SEATEDmode. - Confirm that AVcontrol targets the sitter rather than the controller.
- Confirm that standing clears the active target.
- Confirm that rapid repeated menu presses do not corrupt the command sequence.
- Test multiple sitters and SYNC poses before copying the integration to other products.