GridTalk.de

Normale Version: sitzscript mit Menü zum Animationen wechseln
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Jaja, ich weiss, meine Benennung von Variablen is grenzwertig... es funktioniert ganz nett wenn alle anis auf der gleichen Ausgangsbasis erstellt worden sind:

Code:
integer x;
key name;
key fummel;
integer chan;
string anne;

vector rot = <0,.3,-1.1>;
rotation roti = <180,150,0,0>;
//vector rot = <0.5,0.1,0.5>;
//rotation roti = <0,0,0,0>;
key ilse;

default
{
state_entry()
{
llSitTarget(rot,roti);
ilse=llAvatarOnSitTarget();
llSleep(0.5);

chan = llCeil(llFrand(99));

llListen(chan,"","","");



}

touch_start(integer total_number)
{
    
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);
integer perm = llGetPermissions();
// llSay(0, anne);
//if (perm & PERMISSION_TRIGGER_ANIMATION) llSay(0,"hab");


fummel=llDetectedKey (0);


list animations=[];
for (x=0;x<llGetInventoryNumber(INVENTORY_ANIMATION);x++)
{
animations += llGetInventoryName(INVENTORY_ANIMATION,x);
}
llDialog(llDetectedKey(0),"Such dir eine Ani aus", animations, chan);
name = llDetectedKey(0);
}


listen(integer CHANNEL,string nam, key id, string message)

{

llStopAnimation("sit");
llStopAnimation(anne);
anne=message;

// llSay(0, anne);
//  llSay(0, (string) ilse);

//llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);
//integer perm = llGetPermissions();
//if (perm & PERMISSION_TRIGGER_ANIMATION)
if (fummel==ilse) llStartAnimation(anne);
              



}




changed(integer change)
{
if(change & CHANGED_LINK) ilse = llAvatarOnSitTarget();
}}