Change font size
It is currently Sat Nov 17, 2018 12:06 pm


Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: Script boule de danse pour plusieurs Avatars
PostPosted: Fri Feb 12, 2016 4:15 pm 
User avatar

Joined: Sat Apr 11, 2015 4:05 pm
Posts: 15
Voici un petit script de boule de Danse pour plusieurs Avatars que j'ai modifié pour OpenSim .
J'ai ajouté un ''Channel '' afin que le script répondre mieux a tout le monde lorsque on clique dessus .

Ensuite vous pourrez ajouter vos animations dans la boule de danse.
Noter ici dans le script il a PRIM_TEXTURE, ALL_SIDES, "5d30534f-22d6-4c74-bdc6-67d08f296374" changer le numéro UUID de l'image pour une image de votre choix que vous avez dans votre inventaire !

J'espère vous avoir aidé avec ce petit script utile :)

{L_CODE}:

   
     
list anis;

integer CHANNEL = 60000;

integer lisi;



MakeTheBall()

{

    llSetTimerEvent(10);

    llSetPrimitiveParams([

        PRIM_FLEXIBLE, FALSE, 0, 0.0, 0.0, 0.0, 0.0, ZERO_VECTOR

      , PRIM_MATERIAL, PRIM_MATERIAL_WOOD

      , PRIM_PHANTOM, FALSE

      , PRIM_PHYSICS, FALSE

      , PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR, 0.0, 0.0, 0.0

      , PRIM_SIZE, <1.5,1.5,1.5>

      , PRIM_TEMP_ON_REZ, FALSE

      , PRIM_TYPE, PRIM_TYPE_SPHERE, 0, <0.0,1.0,0.0>, 0.0, ZERO_VECTOR, <0.0,1.0,0.0>

      , PRIM_FULLBRIGHT, ALL_SIDES, TRUE

      , PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_HIGH, PRIM_BUMP_NONE

      , PRIM_COLOR, ALL_SIDES, <0.705,0.449,0.807>, 1.0

      , PRIM_TEXGEN, ALL_SIDES, PRIM_TEXGEN_DEFAULT

      , PRIM_TEXTURE, ALL_SIDES, "5d30534f-22d6-4c74-bdc6-67d08f296374", <4.0,12.0,0.0>, <0,0,0>, 0.5

    ]);

    llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , ALL_SIDES, 0, 1, 0.0, 1.0, 0.1);

    anis = ["STOP"];

    integer a=0;

    while(a<llGetInventoryNumber(INVENTORY_ANIMATION) && a<9){anis+=llGetInventoryName(INVENTORY_ANIMATION,a++);};

    return;   

}



default

{

    state_entry(){MakeTheBall();}

    changed(integer change){if (change & CHANGED_INVENTORY){MakeTheBall();}}

    timer()

    {

        float rot = llFrand(1.0);

        float gruen = llFrand(1.0);

        float blau = llFrand(1.0);       

        //llSetColor(<rot,gruen,blau> , ALL_SIDES );

        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_COLOR, ALL_SIDES, <rot,gruen,blau>, 1.0]);

        llSetTimerEvent(llFrand(25.0));

    }   

    touch_start(integer total_number){llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);}

    run_time_permissions(integer perm)

    {

        if (perm & PERMISSION_TRIGGER_ANIMATION)

        {

            CHANNEL = llRound(llFrand(-99999999.9));

            lisi = llListen(CHANNEL,"","","");

            llDialog(llGetPermissionsKey(), "Choisissez la danse ",anis,CHANNEL);

        }

    }

    listen(integer chan, string name, key id, string mess)

    {

        if ( chan==CHANNEL &&  id == llGetPermissionsKey() &&  mess != "STOP")

        {llStartAnimation(mess);llListenRemove(lisi);}   

        if ( chan==CHANNEL &&  id == llGetPermissionsKey() &&  mess == "STOP")

        {

            integer x = 0; while(x < llGetInventoryNumber(INVENTORY_ANIMATION))

            {llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION, x++));}

            llListenRemove(lisi);

        } 

    }

}


Top
 Profile  
 
 Post subject: Re: Script boule de danse pour plusieurs Avatars
PostPosted: Fri Feb 19, 2016 12:52 pm 
Site Admin
User avatar

Joined: Sun Jun 27, 2010 10:34 am
Posts: 122
Location: France
8-) super je vais tester ceci ce soir :)

Un grand merci pour vos contributions

_________________
Paela Argus,
Webmanagement Osgrid

https://www.osgrid.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net