Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Library: --~<[[ DemoniX DesignZ Inc. ]]>~-- ANTI-POSEBALL:

Noble Barnes
Jack of All Trades
Join date: 3 Aug 2007
Posts: 12
01-17-2008 09:14
CODE

// --~<[[ DemoniX DesignZ Inc. ]]>~-- ANTI-POSEBALL:
// Created: 12/16/2007
// Modified: 01/22/2008 to add in descriptions for how to sync pose balls, and added in the
// Animation Check feature. Also corrected a minor syntex error.
// Scripted By: Noble Barnes of DemoniX DesignZ
// So here goes, after reviewing several pose scripts and seeing that not one in particular
// was actually able to do everything I needed it to do, so I went ahead and created this.
// this is released under free trade, do with it as you wish, I do however ask that you respect the following terms
// 1.) If you use this code please allow it to be atleast mod/copy/no trans
// 2.) Please leave this header intact.
// 3.) If you use this script and like it, donate 1L$ to Noble Barnes.
// 4.) You can use this script to sell your items, but don't sell this script please.
// 5.) Don't expect any technical assistance with this script.
// 6.) This is released 'as is', it works just fine, read the headings they tell you what to do.
// 7.) Don't IM me asking for help with this script. its FREEWARE for that reason, no support included, I will do a custom version if you need one though.
//
// Lockmeister AO compatible
// At time of writing this script is able to override all known Animation Overriders.
//
// Avatar Placement position and rotation information:
// X = +front / behind || Y = +Left / -Right || Z = +above / -below the object
vector avPosition = <0.000,0.000,0.100>; // CAN NOT BE ZERO_VECTOR ( <0,0,0> )
vector avRotation = <0.000,0.000,0.000>; // IN DEGREES 0-360
//
// Avatar Camera placement position and rotation information:
// X = +front / behind || Y = +Left / -Right || Z = +above / -below the object
// HELPFUL NOTE: Camera Controls only initiate if script is in root prim, not child prim.
vector eyeOffset = <1.000,0.000,1.000>;
vector lookat = <0.000,0.000,0.100>;
//
// I have text to display?
integer TX = FALSE;
// if TX == TRUE use these variables for displaying text.
string title = "ANTI-POSEBALL";
vector col = <1,1,1>;
float alp = 1.0;
//
// Do I hide/show myself when used?
integer SH = FALSE;
// * if SH == TRUE use these variables for show/hide options.
integer face = ALL_SIDES;
float shown = 1.0;
float hidden = 0.0;
//
// Normally I put in the name of the animation I am holding for, if you want the script
// to use any animation in the inventory change this to ANIMATION = "";
string ANIMATION = "";
// Do I need to sync anything with another script?
integer sync = FALSE;
//
// * if sync == TRUE use these variables for link message communications.
string syncmessage = "send"; // Put a message you want this pose ball to send to a linked poseball here;
string syncresponce = "receive"; // Put a message you want this pose ball to wait to receive from a linked poseball here;
integer link = LINK_SET;
integer coms = 123456;

//this is the function that sends the above mentioned 'syncmessage''= to the poseball defined by integer link above. with the user is of the avatar sitting on me;
function1(key sitter)
{
llMessageLinked(link,coms,syncmessage,sitter);
}

//this is the function that is performed when the above mentioned 'syncresponce'' message defined above. is heard by a linked poseball.
function2()
{
//put a function in here, commonly I use this area to put in but you can put inanything
//you like. Simply uncomment the lines below to do so.
//stopAnims();
//ANIMATION = "name of second animation here";
//llStartAnimation(ANIMATION);
}

//

//***********************************************************************
// Variables adjusted within script below:
integer is_sitting;
key sitter;
//
//
//
//DO NOT MAKE CHANGES TO THE AREA BELOW THIS LINE UNLESS YOU UNDERSTAND INTERMEIDATE TO ADVANCED LEVEL SCRIPTING.
show()
{
is_sitting = FALSE;
if ( TX ) { llSetText(title, col ,alp); }
if ( SH ) { llSetAlpha(shown, face); }
if ( sync ) { llMessageLinked(link,coms,"empty",NULL_KEY); }
}

hide()
{
is_sitting = TRUE;
if ( TX ) { llSetText("", col ,alp); }
if ( SH ) { llSetAlpha(hidden, face); }
if ( sync ) { llMessageLinked(link,coms,"sat_on",NULL_KEY); }
}

stopAnims()
{
integer i;
list anims = llGetAnimationList(llGetPermissionsKey());
for ( i = 0 ; i<llGetListLength(anims) ; ++i )
{
llStopAnimation(llList2Key(anims, i));
}
}


default
{
state_entry()
{
llSitTarget(avPosition, llEuler2Rot(avRotation * DEG_TO_RAD));
llUnSit(llAvatarOnSitTarget() );
llSetCameraEyeOffset(eyeOffset);
llSetCameraAtOffset(lookat);
if(sync == FALSE)
{
//ADDED THIS TEST CHECK TO VERIFY THERE IS AN ANIMATION PRESENT
integer test = llGetInventoryNumber(INVENTORY_ANIMATION);
if(test != 0)
{
ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0);
show();
}
else
{
llOwnerSay("Unable to locate any Animation in my Inventory, Please check that an Animation does exist within my Inventory");
}
}
}

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

if(change & CHANGED_LINK)
{
key av = llAvatarOnSitTarget();

if(av != NULL_KEY)
{
sitter = av;
llRequestPermissions(av,PERMISSION_TRIGGER_ANIMATION);
}

else
{
if((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && is_sitting)
{
show();
stopAnims();
llSay(-8888,(string)sitter+"booton");
}
}
}
}

run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
hide();
function1(llAvatarOnSitTarget());
llSay(-8888,(string)sitter+"bootoff");
llSleep(0.250);
stopAnims();
llSleep(0.125);
llStartAnimation(ANIMATION);
}
}

link_message(integer link, integer comchan, string sData, key id)
{
if(comchan == coms)
{
function2();
}
}

on_rez(integer start_param)
{
llResetScript();
}
}
_____________________
Sincerest Regards;
Noble Barnes
Owner: DemoniX DesignZ™ Inc. in World


| Please Use PHP tags when posting scripts/code work Please...
| Can't See PHP or URL Tags Correctly, Check Out This Link...
| http://forums.secondlife.com/showthread.php?t=222988
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Library bump
01-21-2008 14:22
:)
_____________________
i've got nothing. ;)
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-21-2008 16:18
I've had an "AO Overriding Poseball in the library for over a year now. Can't believe more people don't take advantage of stopping playing animations so that the user doesn't have to do the annoying and totally unnecessary "ao on"/"ao off" thing.

/15/d3/142207/1.html

Nice 1st post and welcome to the forums Noble.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Synthia Gynoid
PRIMAL DREAMS
Join date: 10 Jul 2007
Posts: 52
syncing
01-21-2008 19:18
Thanks for posting this script, it looks like a fantastic piece of work, and I look forward to trying it. I have one question, however, either for you, or for another scripting expert. Mostly the parts in the code where the user changes things, like the display text and positioning, are pretty clear.

However, one thing I'm not clear about is exactly how to use the section concerning syncing. Specifically, if I want to sync an animation in a poseball using this script, with another poseball using the same script in a linked poseball (as in a couple's poseball set), it's not clear exactly what I need to do. Once the integer sync is set to TRUE.... what then?

I'm able to script some things, but not at a very advanced level. Yet I try, and I try to learn how to do things right. I'm sorry if my question is newbish, or addresses something that is obvious to most people, but I really would like to learn how to use this wonderful script properly, and to its fullest extent.

Thanks very much, and I apologize again if this question is stupid. :)
Noble Barnes
Jack of All Trades
Join date: 3 Aug 2007
Posts: 12
01-22-2008 00:42
From: Synthia Gynoid
Thanks for posting this script, it looks like a fantastic piece of work, and I look forward to trying it. I have one question, however, either for you, or for another scripting expert. Mostly the parts in the code where the user changes things, like the display text and positioning, are pretty clear.

However, one thing I'm not clear about is exactly how to use the section concerning syncing. Specifically, if I want to sync an animation in a poseball using this script, with another poseball using the same script in a linked poseball (as in a couple's poseball set), it's not clear exactly what I need to do. Once the integer sync is set to TRUE.... what then?

I'm able to script some things, but not at a very advanced level. Yet I try, and I try to learn how to do things right. I'm sorry if my question is newbish, or addresses something that is obvious to most people, but I really would like to learn how to use this wonderful script properly, and to its fullest extent.

Thanks very much, and I apologize again if this question is stupid. :)


I added in some minor modifications after seeing your post to allow for easy syncing of the pose balls along with notes on how to do. I hope this helps. Let me know if you need any help with it in game.
_____________________
Sincerest Regards;
Noble Barnes
Owner: DemoniX DesignZ™ Inc. in World


| Please Use PHP tags when posting scripts/code work Please...
| Can't See PHP or URL Tags Correctly, Check Out This Link...
| http://forums.secondlife.com/showthread.php?t=222988
Noble Barnes
Jack of All Trades
Join date: 3 Aug 2007
Posts: 12
01-22-2008 00:44
From: Jesse Barnett
I've had an "AO Overriding Poseball in the library for over a year now. Can't believe more people don't take advantage of stopping playing animations so that the user doesn't have to do the annoying and totally unnecessary "ao on"/"ao off" thing.

/15/d3/142207/1.html

Nice 1st post and welcome to the forums Noble.


Thank you Jesse, I hope to be able to submit more of my more common scripts in the future. and I agree I don't see why people don't all use what I call the stopAnims() function I thought it was pretty common, but I guess from doing some research here it really isn't all that common.

Thanx for the kudos.
_____________________
Sincerest Regards;
Noble Barnes
Owner: DemoniX DesignZ™ Inc. in World


| Please Use PHP tags when posting scripts/code work Please...
| Can't See PHP or URL Tags Correctly, Check Out This Link...
| http://forums.secondlife.com/showthread.php?t=222988
Synthia Gynoid
PRIMAL DREAMS
Join date: 10 Jul 2007
Posts: 52
syntax error
01-22-2008 08:03
Noble, thank you very much for your code update clarifying the use of the syncing function. That helps a lot! :)

However, there seems to be a syntax problem in the code as written. I'm getting a syntax error at line (121, 0), which is:

changed(integer change)


I don't have the skill needed to debug this.... I did try to go through in search of simple things, like unpaired brackets and the like, but nothing seems obvious. Also I double checked that I cut/pasted the whole file, and didn't leave out any end characters. Also I tried to use both the code shown in the post and the plain text file attached to the post. Both generate the same error at the same location.

Lol... I feel foolish, because this is probably something really obvious. Sorry to be a bother. :)
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
01-22-2008 08:32
In the default state

if(ANIMATION == "";)
{ ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0);
show();

should be

if(ANIMATION == "";)
{ ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0);
show(); }
Noble Barnes
Jack of All Trades
Join date: 3 Aug 2007
Posts: 12
01-22-2008 09:00
From: Beverly Ultsch
In the default state

if(ANIMATION == "";)
{ ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0);
show();

should be

if(ANIMATION == "";)
{ ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0);
show(); }


Your very right Beverly thank you for catching that, The bracket was supposed to be to enclose the show() function as well I will update the original to correct that, MY apologies I was half asleep at 4am when I updated this last.
_____________________
Sincerest Regards;
Noble Barnes
Owner: DemoniX DesignZ™ Inc. in World


| Please Use PHP tags when posting scripts/code work Please...
| Can't See PHP or URL Tags Correctly, Check Out This Link...
| http://forums.secondlife.com/showthread.php?t=222988
Noble Barnes
Jack of All Trades
Join date: 3 Aug 2007
Posts: 12
01-22-2008 09:13
From: Synthia Gynoid
Noble, thank you very much for your code update clarifying the use of the syncing function. That helps a lot! :)

However, there seems to be a syntax problem in the code as written. I'm getting a syntax error at line (121, 0), which is:

changed(integer change)


I don't have the skill needed to debug this.... I did try to go through in search of simple things, like unpaired brackets and the like, but nothing seems obvious. Also I double checked that I cut/pasted the whole file, and didn't leave out any end characters. Also I tried to use both the code shown in the post and the plain text file attached to the post. Both generate the same error at the same location.

Lol... I feel foolish, because this is probably something really obvious. Sorry to be a bother. :)


You shouldn't feel foolish Synthia this script can be a bit daunting for non-scripters I tried to make it as user friendly as I could, I am going to go ahead and make this up for distribution at my Main Store at:
CLICK HERE TO THE VISIT DemoniX DesignZ™ Store in Laser Light
or check my Profile under picks for a direct teleport.
_____________________
Sincerest Regards;
Noble Barnes
Owner: DemoniX DesignZ™ Inc. in World


| Please Use PHP tags when posting scripts/code work Please...
| Can't See PHP or URL Tags Correctly, Check Out This Link...
| http://forums.secondlife.com/showthread.php?t=222988
chechel Choche
Registered User
Join date: 1 May 2007
Posts: 5
Scripterror
01-23-2008 06:16
hello,

error in the posting script...

error in line 140, 0 in the atouchment .txt ;(

so sorry, i am stupid? - this script dont work and i look for this in
yours store but nothing to find ;(

what i make wrong ?

sorry CC
Shanna Sungsoo
Registered User
Join date: 25 Nov 2006
Posts: 3
Having the same problem with Errors
04-09-2008 16:47
I too went to your store and was unable to find the script.
Noble Barnes
Jack of All Trades
Join date: 3 Aug 2007
Posts: 12
04-09-2008 22:47
We recently moved to a quieter SIM with a bit more than twice the space we had a Stipe, so here is the Direct TP to the new store.

CLICK HERE TO THE VISIT DemoniX DesignZ™ Store in Laser Light

They are in the same general location just to the right of the Lucky Prize Chairs.
_____________________
Sincerest Regards;
Noble Barnes
Owner: DemoniX DesignZ™ Inc. in World


| Please Use PHP tags when posting scripts/code work Please...
| Can't See PHP or URL Tags Correctly, Check Out This Link...
| http://forums.secondlife.com/showthread.php?t=222988
Cherry Hainsworth
Registered User
Join date: 31 Jul 2006
Posts: 125
04-10-2008 19:43
Very nice. Thank you and welcome :)
_____________________
=================
My stuff on XSt:-
http://tinyurl.com/383mgh