Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llsamegroup issues

bigmoe Whitfield
I>3 Foxes
Join date: 29 Jul 2007
Posts: 459
07-03-2009 22:36
Ive been trying to lockout a dialog and am not having much luck, so here is part of what Ive been working on can somebody try to explain to me what I need to do next

touch_start(integer total_number){
makeDialog(llSameGroup(llDetectedKey(0))==FALSE);
}

listen(integer channel, string name, key talkerID, string message)
{
if(channel == gDialogChannel)
{
if(message == "All On";)
_____________________
GoodBye Forums we will miss you ~moe 2-2-2010~
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
07-03-2009 23:21
From: bigmoe Whitfield

touch_start(integer total_number){
makeDialog(llSameGroup(llDetectedKey(0))==FALSE);
}

listen(integer channel, string name, key talkerID, string message)
{
if(channel == gDialogChannel)
{
if(message == "All On";)


It's hard to tell what is going on in your makeDialog function. Right now, you are getting either a TRUE or FALSE into it, so you aren't even passing the key of the person who touched it. But what you are trying to do is something like this.

CODE

touch_start(integer total_num)
{
if(llSameGroup(llDetectedKey(0)))
{
//do your dialog stuff here
}
}
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-04-2009 00:10
Lazink has the idea... but you may want to replace llSameGroup( llDetectedKey( 0 ) ) with llDetectedGroup( 0 ) if you need to trigger it for only NON group, then tack a ! symbol in front of it.
_____________________
|
| . "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...
| -
bigmoe Whitfield
I>3 Foxes
Join date: 29 Jul 2007
Posts: 459
07-04-2009 12:22
I am just trying to stop the dialog from being used by non group members and was trying to figure out how to block that at the very start of the dialog so it would check to see if they have it active. I will try the tweak when I get in world
_____________________
GoodBye Forums we will miss you ~moe 2-2-2010~
bigmoe Whitfield
I>3 Foxes
Join date: 29 Jul 2007
Posts: 459
07-04-2009 13:10
Thank you guys that worked like a charm :)
_____________________
GoodBye Forums we will miss you ~moe 2-2-2010~
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
07-04-2009 13:12
Just to be really clear, Lazink is suggesting that unless your script creates many dialog boxes at different times, it's probably simpler to put the llDialog command right in your touch_start event instead of running it in a user defined function. A minimal snippet looks like this ......

CODE

touch_start(num_detected)
{
if(llDetectedGroup(0))
{
list Buttons = ["Button 1","Button 2","Button 3","Button 4"];
llDialog (llDetectedKey(0), "Push one of these buttons, please", Buttons, gDialogChannel);
}
}


where gDialogChannel is your channel for the dialog and you put your own labels on the buttons in place of "Button 1" and so forth.

Edit: Aha! Glad you got it to work while I was typing my note. :)
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
bigmoe Whitfield
I>3 Foxes
Join date: 29 Jul 2007
Posts: 459
07-04-2009 13:35
ok edit message here, I got what I needed done. seems I kept trying to declare something that wasnt in the script so all is fixed and cool now thanks again
_____________________
GoodBye Forums we will miss you ~moe 2-2-2010~