Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Chat and visitor scripts

OzRubbaGasmask Sussermann
Registered User
Join date: 27 May 2008
Posts: 3
05-27-2008 06:23
Hello there.

I have just bought a house that has the tint windows/Lights/Lock doors on a menu. To access this you have to type in the chat box /99 Menu.

My previous home had a clickable prim on the wall, which made it a lot simpler to access the menu, and only the owner of the house could get this menu to show when clicked on.

I have textured a prim to look like a door access panel by the door and was wondering if there is a script that I can put in it, that will do the same job, save me having to type in the chat box all the time.

Would that script also be able to include when someone clicked on the door of the house?

Thanks, Oz!

Edited to add that I have found out the visitor scripts so its just accessing the house menu now :-)
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
05-27-2008 07:23
You could try this, but i am not sure if an object can trigger a menu as it needs a key to send the menu box too.

CODE

default
{
touch_start(integer total_number)
{
if(llDetectedKey(0) == llGetOwner())llSay(99,"Menu");
}
}


Try it, but at least you now have som idea of how to detect an objects owner and only respond to them, even if it dosent work to trigger the menu :)
Wicc Cunningham
Registered User
Join date: 25 Jun 2004
Posts: 52
05-27-2008 07:30
If you want something to just do the /99 menu then this will work:

CODE


default
{
touch_start(integer touches)
{
llDialog(llDetectedKey(0), "Start Menu", ["menu"], 99);
}
}



This will give you a dialog box with a button labeled menu, click that and it should give you the menu from the controller script in the house. Otherwise it's best to contact the builder of the house and they can usually direct you to who created the scripts for the house.
OzRubbaGasmask Sussermann
Registered User
Join date: 27 May 2008
Posts: 3
05-27-2008 07:46
Thanks a bunch chaps, will give both a go and see the result. Cheers Oz!

Mmmmmm, getting a syntax error 12,0

This is the script as pasted into the prim:

default
{
state_entry()
{
llSay(0, "Hello, Avatar!";);
}

touch_start(integer total_number)
{
llSay(0, "Touched.";);
}
}
CODE


default
{
touch_start(integer touches)
{
llDialog(llDetectedKey(0), "Start Menu", ["menu"], 99);
}
}




Getting an errror with the other one as well, so maybe I anot putting it in right...(likely, LoL)
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
05-27-2008 08:06
when you copy the script don't copy the
CODE
 and 
tags, they are only for the forum formatting and will cause an error in SL.
The code then overwrites the default script in the editor, in other words open the editor select and delete everything, and the paste in the script into the empty editor.
OzRubbaGasmask Sussermann
Registered User
Join date: 27 May 2008
Posts: 3
05-27-2008 08:43
Oh, OK thanks Very...noob here, lol :-)