Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
//script for sitting cross legged on an object
//by Ananda Sandgrain - free to distribute but please don't sell!
key avatar;
vector pos = <-0.25,0,0.8>; //adjust the position to fit object -must be
//nonzero in at least one direction or script will not work!
rotation rot = <0,0,0,1>; //adjust rotation (1 in any vector gives 90 deg)
default
{
state_entry()
{
llSitTarget(pos, rot);
}
changed(integer change)
{
avatar = llAvatarOnSitTarget();
if(change & CHANGED_LINK)
{
if(avatar == NULL_KEY)
{
// You have gotten off
llStopAnimation("sit_ground");
llReleaseControls();
llResetScript();
}
else if(avatar == llAvatarOnSitTarget())
{
// You have gotten on
llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION );
}
}
}
run_time_permissions(integer perms)
{
if(perms)
{
llStopAnimation("sit");
llStartAnimation("sit_ground");
}
else
{
llUnSit(avatar);
}
}
}
//*****************************************
//* Nyterave animation ball script! *
//* FREE TO USE V2.1 *
//* by Sitting Lightcloud *
//******************************************/
// * * * * * * * MODIFY BELOW * * * * * * *//
// position to sit on the ball e.g <0.0, 0.0, 0.43>
// sit 0.5 meter above the ball
vector POSITION=<-0.5, 0.0, -0.35>;
// hovertext above ball. "" for none.
// add '\n ' at the end to move text up i.e.
// string HOVERTEXT="Sit Here\n ";
string HOVERTEXT="";
// Pie Menu Sit Text. Will only work for the
// main prim but included it anyway. If no text
// is entered between "" it won't be used.
string SIT_TEXT="Nimm Platz";
// hovertext color 'r,g,b' e.g. "255,255,255" (white)
string HOVER_RGB="255,255,255";
// LISTEN sets if this ball should listen for voice commands
// or not. You only need to enable this for 1 ball if you
// link several balls to an object. (to reduce lagg).
// Change to TRUE to enable FALSE to disable.
integer LISTEN=FALSE;
// What channel to listen for hide/show on. If you want to
// listen to normal conversation (hide/show), set channel
// to 0 otherwise the command will be /channel hide, show
integer CHANNEL=8;
vector MY_ROT = <0,270,270>; //45 degrees around the z-axis, in Euler form
//MY_ROT *= DEG_TO_RAD; //convert to radians
rotation MY_ROTATE; //90 degrees around the x-axis
//PI_BY_TWO
// * * * * * * * STOP MODIFY * * * * * * * *//
set_text()
{
llSetText("",<270,0,0>,0.0);
}
list rgb;
string animation;
integer listener;
default
{
state_entry()
{
if (llStringLength(SIT_TEXT)>0)
llSetSitText(SIT_TEXT);
MY_ROT *= DEG_TO_RAD;
MY_ROTATE = llEuler2Rot( MY_ROT );
//
llSitTarget(POSITION, MY_ROTATE);
set_text();
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
if (llAvatarOnSitTarget() != NULL_KEY)
{
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);
}
else
{
integer perm=llGetPermissions();
if ((perm & PERMISSION_TRIGGER_ANIMATION) && llStringLength(animation)>0)
llStopAnimation(animation);
set_text();
animation="";
}
}
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit");
animation=llGetInventoryName(INVENTORY_ANIMATION,0);
llStartAnimation(animation);
llSetText("",<0,0,0>,0.0);
}
}
}