About SitTargets
To sit on an object in SL, the object must have an available SitTarget. Each prim in an object can only have one SitTarget and when an avatar sits on a prim, the avatar will occupy that SitTarget. AVsitter’s default is to assign avatars to SITTERs in the order they sit. The first avatar to sit will be assigned to SITTER 0 and the second avatar to sit will be assigned to SITTER 1.
Assigning SitTargets (special/advanced only)
AVsitter’s default is to assign avatars to SITTERs in the order they sit, but you can override it:
- If you want to allow avatars to target a specific SITTER when they sit on a certain prim (e.g. cushion).
- When your object contains multiple setup prims that include at least one couples setup.
- To reserve the SitTarget on a certain prim for use by another script (e.g. vehicle’s driver script).
AVsitter will assign SitTargets to prims using the following method:
- If there is only one SITTER in the prim, AVsitter assigns the SitTarget to that prim.
- If there is more than one SITTER in the prim (e.g. couples), AVsitter assigns SitTargets starting with the root prim, followed by prim 2, 3, etc of the furniture…
To override the default behavior:
- Assign a SET # in the AVpos notecard.
- Assign each SITTER to a prim by typing the SET # and SITTER # into the description of the prim you want to assign that SITTER to, separated by a dash (-). e.g:
- To assign the SitTarget for SET 0, SITTER 0 to a prim, type 0-0 into the description of that prim.
- To assign the SitTarget for SET 0, SITTER 1 to a prim, type 0-1 into the description of that prim.
- To assign the SitTarget for SET 1, SITTER 1 to a prim, type 1-1 into the description of that prim.
note: You must choose prims that are distinctly separate and obvious places for an avatar to sit.
- Repeat for all setups in the furniture that are for more than one avatar.
- Unlink and re-link the object or reset scripts for your changes to take effect.
Assigning SitTargets Video
SitTargets and Multiple Setups
If you have Multiple Setups in your furniture then you must assign a unique SET # to each setup that is for more than one avatar. e.g. If you have 2 separate couples setups in the same furniture, type SET 0 into the notecard of one and SET 1 into the notecard of the other. You would then need to Assign a SitTarget in prim descriptions for each SITTER in those setups.
SitTargets and Multiple Setups Video
Reserving SitTargets
AVsitter places and removes SitTargets automatically throughout the object, but you might want to override this:
- For a vehicle’s driver seat which has its own animations in the vehicle script.
- If you are using a different sit script in one of the prims.
To reserve the SitTarget of a specific prim, use -1 in that prim’s description. Remember to re-link the object for changes to take effect.
After adding -1 to a prim’s description you should reset your own scripts inside the prim, to ensure those scripts replace their own SitTargets.
If your use of AVsitter includes any prims for multiple sitters then you will also need to follow the instructions for SitTargets and Multiple Setups as described above (assigning a SET # to each setup and assigning the SitTargets in prim descriptions).
As an alternate to placing -1 in the prim description you can add a custom script to the prim that uses the 90150 link message to replace the SitTarget in the prim when required. e.g:
default
{
link_message(integer sender, integer num, string msg, key id)
{
if(num == 90150)
{
llSitTarget(<0,0,0.1>, ZERO_ROTATION);
}
}
}