Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Noob Question.. easy fix im sure

Traken Damone
Registered User
Join date: 16 Mar 2006
Posts: 12
01-09-2009 00:14
basically I have a script thats full mod.. and works wonderfully as to what I want it to do.. except...

its set up so only owner can access the menu.. and I would like it to be open access to anyone.. here are the lines Im seeing that call on owner and im thinking it should be a pretty simple fix.. but without knowing the syntax enough of lsl.. yes.. im noob at scripting but trying to learn, its causing me some problems.. any responce will be completely appreciated!

heres the code in questiong

key owner;

later it refers to owner again here..

init() {
llListenRemove(listen_handle);
owner = llGetOwner();
channel = llFloor(llFrand(2000000)); //random channel so multiple scripts don't interfere with each other
listen_handle = llListen(channel, "", owner, "";);
}

and again ..

llDialog(owner, "\n\nSelect a color", llList2ListStrided(sub_menu, 0, -1, 2), channel);
return;

and to complicate matters more.. continues to call upon owner

touch_start(integer s) {
if (llDetectedKey(0) == owner) {
llDialog(owner, "\n\nSelect a color group", main_menu, channel);


now.. Im wondering if theres a certain word that lsl will understand to change to any or all or if Im just gonna have to buck down and do my best to write the script over on my own... would seem a waste since I already have the script I want.. just need permissions changed..

please please any help would be again.. highly appreciated!!
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
01-09-2009 01:21
That's simple.

First remove your init() function. No use. Then for the sake of clarity, change the name of the "owner" variable.

key Avatar;

touch_start(integer num)
{
Avatar = llDetectedKey(0);
channel = -llFloor(llFrand(2000000)); // Use a negative channel
listen_handle = llListen(channel, "", Avatar, "";);
llDialog(Avatar, "\n\nSelect a color group", main_menu, channel);
}

listen(integer channel, string name, key id, string msg)
{
llListenRemove(listen_handle);
// etc, etc

And everytime you see llDialog(owner, ...); do the same:

listen_handle = llListen(channel, "", Avatar, "";);
llDialog(Avatar, ...);

That's it. Do it and come back for more questions, like for example: How to detect the "Ignore" button?
Traken Damone
Registered User
Join date: 16 Mar 2006
Posts: 12
01-09-2009 02:06
Thank you very much.. seems to have worked like a charm.. my alt loves you btw.. LOL

So im guessing as soon as you define the name of key.. then any other instance as long as I use the same key name.. will work.. so maybe there is hope for a noob to learn this!

ignore button.. gawd my head is reeling as it is.. but im sure I will be back for that!!
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
01-09-2009 09:18
the ignore button is there by default for any dialog, it simply closes the dialog without giving the script any kind of response