Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

I have three questions

Trish Barbasz
Registered User
Join date: 29 Dec 2007
Posts: 17
01-20-2008 09:01
1. How do you remove the 'sit' option from the pie menu of an object?
2. How do you rez a object at a target?
3. How do you use a script to delet an object?
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
01-20-2008 09:56
From: Trish Barbasz
1. How do you remove the 'sit' option from the pie menu of an object?
Well, you can *change* it with llSetSitText()... probably if you make it blank, it will be blank in the pie menu (which isn't the same as being greyed-out).
From: someone
2. How do you rez a object at a target?
llRezObject or llRezAtRoot... or, if the target is more than 10m away, one of those plus a warpPos.
From: someone
3. How do you use a script to delet an object?
llDie().
_____________________
Archived for Your Protection
Trish Barbasz
Registered User
Join date: 29 Dec 2007
Posts: 17
01-20-2008 10:05
From: Qie Niangao
Well, you can *change* it with llSetSitText()... probably if you make it blank, it will be blank in the pie menu (which isn't the same as being greyed-out).


but how do I get it greyed out?
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
01-20-2008 10:49
From: Trish Barbasz
but how do I get it greyed out?


You probably can't.

You could put a script in there to unsit anyone as soon as they sit on the object though.

-Atashi
_____________________
Visit Atashi's Art and Oddities Store and the Waikiti Motor Works at beautiful Waikiti.
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
01-20-2008 11:01
you CAN make it impossible to sit on a prim by automatically unsitting anything from it.

vaguely like that:

changed(){
//check if the change is an avatar sitting on the prim
llUnsit
}
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-20-2008 12:18
if the linkset changes number of prims, you'll want to set a sit target, and test with

CODE

llSitTarget( ZERO_VECTOR, ZERO_ROTATION ); //-- this line goes in default state_entry

changed( integer vBitChanges ){
if (llAvatarOnSitTarget()){
key vKeyLast; = llGetLinkKey( llGetNumberOfPrims() );
while (llGetAgentSize( vKeyLast = llGetLinkKey( llGetNumberOfPrims() ) ) != ZERO_VECTOR){
llUnSit( vKeyLast );
}
}
}


if not then use

CODE

changed( integer vBitChanges ){
if (CHANGED_LINK & vBitChanges){
key vKeyLast; = llGetLinkKey( llGetNumberOfPrims() );
while (llGetAgentSize( vKeyLast = llGetLinkKey( llGetNumberOfPrims() ) ) != ZERO_VECTOR){
llUnSit( vKeyLast );
}
}
}


those will pick up multiple sits at once, while you're in other code proccesing
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Trish Barbasz
Registered User
Join date: 29 Dec 2007
Posts: 17
01-20-2008 17:48
From: Void Singer
if the linkset changes number of prims, you'll want to set a sit target, and test with

CODE

llSitTarget( ZERO_VECTOR, ZERO_ROTATION ); //-- this line goes in default state_entry

changed( integer vBitChanges ){
if (llAvatarOnSitTarget()){
key vKeyLast; = llGetLinkKey( llGetNumberOfPrims() );
while (llGetAgentSize( vKeyLast = llGetLinkKey( llGetNumberOfPrims() ) ) != ZERO_VECTOR){
llUnSit( vKeyLast );
}
}
}


if not then use

CODE

changed( integer vBitChanges ){
if (CHANGED_LINK & vBitChanges){
key vKeyLast; = llGetLinkKey( llGetNumberOfPrims() );
while (llGetAgentSize( vKeyLast = llGetLinkKey( llGetNumberOfPrims() ) ) != ZERO_VECTOR){
llUnSit( vKeyLast );
}
}
}


those will pick up multiple sits at once, while you're in other code proccesing


OK I tried those scripts, maybe I'm doing something wrong but you can still select "Sit Here" from the pie menu
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-20-2008 18:23
From: Trish Barbasz
OK I tried those scripts, maybe I'm doing something wrong but you can still select "Sit Here" from the pie menu


Yes. What they are saing is that you cannot disable that. The best you can do is make it ineffective by shoving avatars back off after they have sat. You can also change the default left-click action so they have to do it through the pie menu, and change the text to say something different. You could also set the sit target to some odd location so when they are unseated they aren't in an inconvenient location (or llSetPrimitiveParams() after the fact, but you can find plenty about that in other threads at the moment).
Trish Barbasz
Registered User
Join date: 29 Dec 2007
Posts: 17
Thank you
01-20-2008 18:38
Oh, OK, Thank you all for your time.