Change font size
It is currently Tue Jul 17, 2018 11:30 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 8 posts ]
Author Message
 Post subject: Reading animation
PostPosted: Sun Dec 18, 2011 4:12 pm 
Furious Typer
User avatar

Joined: Fri Jul 16, 2010 2:53 pm
Posts: 240
In SL, I had these closed books that when you would click on any one of them, after asking your permission, it would position you in a reading position with an open book.

Is there any way I can reproduce this if I have a few reading animations here in OSGrid?

I made a bunch of closed books and open ones. I just need to find out how the rest is done.

I am NOT good with scripting so please, pretty please if you know how to do this, could you make it simple for me to understand it? ... lol

Any help is greatly appreciated ... as always :)

Selea


Top
 Profile  
 
 Post subject: Re: Reading animation
PostPosted: Mon Dec 19, 2011 12:50 am 
Furious Typer
User avatar

Joined: Sat Jul 16, 2011 3:35 pm
Posts: 164
Sounds


Last edited by Wolf Paws on Wed Feb 29, 2012 7:58 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Reading animation
PostPosted: Mon Dec 19, 2011 3:45 am 
You could try to contact with Eryn Galen, she produced a book sit animation and script for the OSG Gazette maybe she can help. Toy Mcbride also has a treestump with book read at Littlefield furniture store.

Basically you would use

{L_CODE}:
llSetLinkAlpha(X, 0, ALL_SIDES);


where X = the prim link number to hide each part of the book and

{L_CODE}:
llSetLinkAlpha(X, 1, ALL_SIDES);


to show it when avatar clicks and sits on the book.

Hope that helps a bit


Top
  
 
 Post subject: Re: Reading animation
PostPosted: Mon Dec 19, 2011 9:25 am 
Furious Typer
User avatar

Joined: Fri Jul 16, 2010 2:53 pm
Posts: 240
Hi Sarah :)

What I found at Littlefield, was something I've been using for a long time now. I used the MLP scripts to create all kinds of menus for sitting positions. Ex; dinning table, relaxing couches, cuddles and others. I'm kinda proud of that because it took me about a month to figure out how to use the MLP scripts. I even managed to use the HIDE command to have anims positions for single avatar. It gave me a few extra white hair ... no kidding ... lol

I did say I'm absolutely no good with scripts ... right?

As for the little pieces of script you gave me, I'm afraid I have no idea where to put them. But thank you so much for your reply :)

Guess I have to keep at it using the give object script till I finally do what I want. I keep telling myself ... "self ... if you managed to figure out the MLP stuff, surely you can figure this out". After all, I have alllllllllllll the time ... lol

Again ... thank you :)

Selea


Top
 Profile  
 
 Post subject: Re: Reading animation
PostPosted: Tue Dec 20, 2011 6:03 am 
Sorry yes the Littlefield is an MLP one, must have been another...send me the books open and closed and I try to make this work for you.

Sarah


Top
  
 
 Post subject: Re: Reading animation
PostPosted: Tue Dec 20, 2011 6:22 am 
Furious Typer
User avatar

Joined: Fri Jul 16, 2010 2:53 pm
Posts: 240
Hi Sarah :)

I sent to you via IM in OSGrid ... hope you got it. If not, let me know how I can send you.

Selea


Top
 Profile  
 
 Post subject: Re: Reading animation
PostPosted: Tue Dec 20, 2011 1:45 pm 
All done, send you the finished books back in folder.
Sarah

I paste the scripts for others below...its a bit messy, I just cut and paste other peoples scripts, then see if it compiles lol, feel free to tidy it up.

To go in a transparent poseball containing an animation
{L_CODE}:
//Anxiousness Chair v.1
//By: Kaneda Akenbono
//Enjoy, and I'd appreciate it if you left this on the script. :)
//
//Add the animations you want to your object.
//I pulled the stuff below into globals so you can easily modify this script without understanding any of the code. :)

vector Angle = <0,0,0>; //Enter a vector rotation for the sit...
vector SitLoc = <0,0,0.1>; //This is the sitTarget positioning... CANNOT EQUAL 0
//string LoadText = "Anxiousnes Chair v.1 - Comment this out or change if you want..."; // The text you want to show when the object loads...
string Context = "Sit"; //The text you want in the context menu...

//Globals!! WOOO!!
key user;
key sitAgent = NULL_KEY;
list animations;
integer animNum;
integer nextAnim = 1;
integer curAnim = 0;
integer counter = 0;

//This part dynamically gathers all of the animations you've placed in the object for usage later...
initialize()
{
        integer x;
        list oldAnim;
        animNum = llGetInventoryNumber(INVENTORY_ANIMATION);
        for (x = 0; x < animNum; x++)
        {
            animations = oldAnim + [x];
            oldAnim = animations;
        }
        llMessageLinked(LINK_SET, 0, "showclosedbook", NULL_KEY);
         llMessageLinked(LINK_SET, 0, "hideopenbook", NULL_KEY);
}

default
{
state_entry()
        {
        initialize();
        //For easy rotation in the llSitTarger enter the vector rotation below..
        vector eul = Angle; //45 degrees around the z-axis, in Euler form..
        eul *= DEG_TO_RAD; //convert to radians...
        rotation quat = llEuler2Rot( eul ); //convert to quaternion...
    //    llSay(0, LoadText);
        //Text it says under the context menu...
        llSetSitText(Context);
        //Adjust the positioning of the user while siting... also need for llAvatarOnSit... if this value is equal to 0, it doesn't work, so set it to make it look right for your object
        llSitTarget(SitLoc, quat);
        llMessageLinked(LINK_SET, 0, "showopenbook", NULL_KEY);
        llMessageLinked(LINK_SET, 0, "hideclosedbook", NULL_KEY);
        }

changed(integer change)
{
        //If the user sits on the object...
        if (change & CHANGED_LINK)
        {
           
        user = llAvatarOnSitTarget();
            if (llAvatarOnSitTarget() != NULL_KEY )
            {
            llRequestPermissions(user, PERMISSION_TRIGGER_ANIMATION);
            llMessageLinked(LINK_SET, 0, "showopenbook", NULL_KEY);
            llMessageLinked(LINK_SET, 0, "hideclosedbook", NULL_KEY);
            }
       
            else
            {
          //      llSay(0, "getting up");
            llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
            llMessageLinked(LINK_SET, 0, "showclosedbook", NULL_KEY);
            llMessageLinked(LINK_SET, 0, "hideopenbook", NULL_KEY);
           
            }
        }
       
}
run_time_permissions(integer perm)
{
        if (perm)
        {
            //This starts the first animation...
             llStopAnimation("sit");
            llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
        curAnim = 0;
        }
}
}



To go in each prim of open book
{L_CODE}:
default
{
    state_entry()
    {
       
    }
   
    on_rez(integer start_param)
    {
        llResetScript();
    }
   
    link_message(integer sender_num, integer num, string str, key id)
    {
        if (str == "showopenbook")
        {
            llSetAlpha(1,ALL_SIDES);           
        }
       
        if (str == "hideopenbook")
        {
            llSetAlpha(0,ALL_SIDES);
        }
    }
}



To go in each prim of closed book
{L_CODE}:
default
{
    state_entry()
    {
       
    }
   
    on_rez(integer start_param)
    {
        llResetScript();
    }
   
    link_message(integer sender_num, integer num, string str, key id)
    {
        if (str == "showclosedbook")
        {
            llSetAlpha(1,ALL_SIDES);           
        }
       
        if (str == "hideclosedbook")
        {
            llSetAlpha(0,ALL_SIDES);
        }
    }
}


Link everything up You will make the root prim in the closed book.
Sarah


Top
  
 
 Post subject: Re: Reading animation
PostPosted: Tue Dec 20, 2011 2:57 pm 
Furious Typer
User avatar

Joined: Fri Jul 16, 2010 2:53 pm
Posts: 240
Sarah, you are just AMAZING ... omg ... lol

Geeze, I leave for a few hours and come back to exactly what I needed.

I've been at this for months ... lol

Sarah, Gawd ... thank Youuuuuuuuuuuuuu

I would make it longer but it still is too much of a small thing to say. At times, thank you is just not enough.

This is just fantastic :)

Selea


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 8 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:  
cron


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