Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

not for group

Dragger Allen
Registered User
Join date: 3 Mar 2007
Posts: 247
01-31-2009 19:17
i have a script that i do not want it to activate when the group it is set to causes the collsion
the way it is now any one that comes in contact activates it

any help on this would be appreciated
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
01-31-2009 21:05
http://rpgstats.com/wiki/index.php?title=LlSameGroup

Here's what you need.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Dragger Allen
Registered User
Join date: 3 Mar 2007
Posts: 247
01-31-2009 21:07
From: Winter Ventura

that activates it for the same group i want it to activate when it returns false and that is what has me messed up
_____________________
Faust Vollmar
llSetAgentSanity(FALSE);
Join date: 3 Feb 2007
Posts: 87
01-31-2009 21:22
Just use the NOT clause. Example: if( !llSameGroup(key) )
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
01-31-2009 21:43
From: Faust Vollmar
Just use the NOT clause. Example: if( !llSameGroup(key) )


or, put a bit easier to read..

if (llSameGroup() == FALSE) { do stuff }

or.. use an "else".

if (llSameGroup()) {do x}
else { do Y}
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Dragger Allen
Registered User
Join date: 3 Mar 2007
Posts: 247
01-31-2009 22:07
ok harder then i thuoght it would be my had goes off to all the scripters that do this every day how about i just post here what i have and some one fix it pleeeeeeeeeeeeeeeeeeease


vector velocity;
integer shot = FALSE;
integer fade = FALSE;
float alpha = 1.0;

default
{
state_entry()
{
llSetStatus(STATUS_DIE_AT_EDGE, TRUE);
}

on_rez(integer start_param)
{
llSetStatus(STATUS_DIE_AT_EDGE, TRUE);
llSetBuoyancy(1.0);
llCollisionSound("", 1.0); // Disable collision sounds
velocity = llGetVel();
float vmag;
vmag = llVecMag(velocity);
if (vmag > 0.1) shot = TRUE;
llSetTimerEvent(0.0);
}

collision_start(integer num)
{
if (llDetectedType(0) & AGENT)if
(llSameGroup) {}
else {


// llTriggerSound("frozen", 1.0);
llRezObject(">:) invisible", llDetectedPos(0), ZERO_VECTOR, llGetRot(), 0);
{
integer i;
for ( i=0; i<num; i++ ) {

llRezObject( "Object", llGetPos()+<3,3,2>, <0,0,0>, <0,0,0,1>, i );
llRezObject( "Object", llGetPos()+<-3,-3,2>, <0,0,0>, <0,0,0,1>, i );
llRezObject( "Object", llGetPos()+<-3,3,2>, <0,0,0>, <0,0,0,1>, i );
llRezObject( "Object", llGetPos()+<3,-3,2>, <0,0,0>, <0,0,0,1>, i );

llRezObject( "Object", llGetPos()+<-8,0,2>, <0,0,0>, <0,0,0,1>, i );
llRezObject( "Object", llGetPos()+<8,0,2>, <0,0,0>, <0,0,0,1>, i );
llRezObject( "Object", llGetPos()+<0,-8,2>, <0,0,0>, <0,0,0,1>, i );
llRezObject( "Object", llGetPos()+<0,8,2>, <0,0,0>, <0,0,0,1>, i );

llRezObject( "Object", llGetPos()+<0,0,9>, <0,0,0>, <0,0,0,1>, i );
llRezObject( "Object", llGetPos()+<0,0,-9>, <0,0,0>, <0,0,0,1>, i );
integer i;
}}
}
}

timer()
{
if (!fade)
{
if (shot)
{
llDie();
}
}
else
{
llSetAlpha(alpha, -1);
alpha = alpha * 0.95;
if (alpha < 0.1)
{
llDie();
}
}
}
}
_____________________
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
02-01-2009 15:33
Try either
CODE
 if (llDetectedType(0) & AGENT && llSameGroup(llDetectedKey(0))==FALSE) 
{ //do stuff
}
or
CODE
 if (llDetectedType(0) & AGENT && llDetectedGroup(0)==FALSE) 
{ //do stuff
}