Change font size
It is currently Mon Nov 19, 2018 10:17 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Zero Lag Poseball Script
PostPosted: Sat May 17, 2008 2:53 am 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
video demonstration : http://www.nebadon2025.com/opensim/view ... 3&t=18#p18

{L_CODE}:
// Jippen Faddoul's Poseball script - Low ram/lag posepall thats just drag-and drop simple
// Copyright (C) 2007 Jippen Faddoul
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License version 3, as
//    published by the Free Software Foundation.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>



//This text will appear in the floating title above the ball
string TITLE="Sit here";           
//You can play with these numbers to adjust how far the person sits from the ball. ( <X,Y,Z> )
vector offset=<0.0,0.0,0.5>;           

///////////////////// LEAVE THIS ALONE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
string ANIMATION;
integer visible = TRUE;
key avatar;

vector COLOR = <1.0,1.0,1.0>;
float ALPHA_ON = 1.0;
float ALPHA_OFF = 0.0;

show(){
    visible = TRUE;
    llSetText(TITLE, COLOR,ALPHA_ON);       
    llSetAlpha(ALPHA_ON, ALL_SIDES);
}

hide(){
    visible = FALSE;
    llSetText("", COLOR,ALPHA_ON);       
    llSetAlpha(ALPHA_OFF, ALL_SIDES);
}

default{
    state_entry() {
        llSitTarget(offset,ZERO_ROTATION);
        if((ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0)) == ""){
            llOwnerSay("Error: No animation");
            ANIMATION = "sit";
            }
        llSetSitText(TITLE);
        show();
    }

    touch_start(integer detected) {
        //llOwnerSay("Memory: " + (string)llGetFreeMemory());
        if(visible){ hide(); }
        else       { show(); }
    }

    changed(integer change) {
        if(change & CHANGED_LINK) {
            avatar = llAvatarOnSitTarget();
            if(avatar != NULL_KEY){
                //SOMEONE SAT DOWN
                hide();
                llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
                return;
            }else{
                //SOMEONE STOOD UP
                if (llGetPermissionsKey() != NULL_KEY){ llStopAnimation(ANIMATION); }
                show();
                return;
            }
        }
        if(change & CHANGED_INVENTORY) { llResetScript(); }
        if(change & CHANGED_OWNER)     { llResetScript(); }
    }

    run_time_permissions(integer perm) {
        if(perm & PERMISSION_TRIGGER_ANIMATION) {
            llStopAnimation("sit");
            llStartAnimation(ANIMATION);
            hide();
        }
    }
}


Drop this script and a pose into a prim and whalla, make sure your animation or pose has a priority of 4 or your legs wont actually be posed.


Top
 Profile  
 
 Post subject: Re: Zero Lag Poseball Script
PostPosted: Fri Jul 04, 2008 9:30 am 

Joined: Mon Mar 31, 2008 10:08 am
Posts: 22
LOL, the video!

Script Newbie questions:-)

I'd like to try it, but what's a whalla? And where do I drop the poses? Paste it into the script? Drop them into the prim contents beside the script? Where can I get free poses from, or how do I create them myself?

I did put the script into a prim, I deleted all contents of the "new script" and pasted the Poseball Script, but I got an error message appearing above the prim. Am I suppose to _integrate_ the poseball script into the default "new script" somehow which pops up when clicking new script? If yes, how must the default script "wrap" the poseball script?

Or, to make it much simpler, would you be so kind and drop a working Poseball into the Freebie garden, this would make it much easier to evaluate how everthing is assembled.


Top
 Profile  
 
 Post subject: Re: Zero Lag Poseball Script
PostPosted: Fri Jul 04, 2008 9:37 am 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
sorry i should have been more specific, you want to drop this script and a pose into the prim it will detect the pose and it should automaticlly just work once both are inside the prim, also i suggest you 1st create the script in your inventory, then drag it from your inventory into the prim, but if you do create a new script inside the prim, be sure to overwrite the default script and save. here is a link to a pack of animations provided by the lindens. :D

http://secondlife.com/community/avatar.php

enjoy :ugeek:


Top
 Profile  
 
 Post subject: Re: Zero Lag Poseball Script
PostPosted: Fri Jul 04, 2008 5:08 pm 

Joined: Mon Mar 31, 2008 10:08 am
Posts: 22
These are handy tips, thanks. And the link is also very nice, never knew all these are just downloadable. (And then uploadable again:-) I've also had the chance to talk to someone inworld and she gave me a working poseball to evaluate. I really should avoid this tendency to "overthink" complexities, as it often turns out much simpler than originally thought.

So excuse me, I have the golden rule to heed:-)


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