Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Simple Dialog Script

conor Bradley
That other guy
Join date: 31 May 2006
Posts: 22
09-09-2009 14:48
I need a script made, full perms.... the script should be something like this:

When stepping on the prim the script is inside of, a dialog box will pop up with text that i will insert, the button on the dialog box should just be a simple OK button, that will dismiss the dialog box.

To the one that can make this script and send it to: Conor Bradley in game i would greatly appreciate it.
conor Bradley
That other guy
Join date: 31 May 2006
Posts: 22
09-09-2009 19:56
Anyone?
Klug Kuhn
Registered User
Join date: 7 Sep 2007
Posts: 126
09-09-2009 21:35
You may find this useful. Copy and paste it onto a new script, change the top 3 lines settings to suit your need. This little snippet is very low lag without any scanning event. :)




string menu_message = "TYPE MESSAGE HERE"; // menu message
list menu_button = ["OK"]; // menu button, maximum 12 buttons e.g. ["button1","button2","button3"]
float reset_time = 60.0; // time in second to reset the menu available for the next person

//======= NO NEED TO CHANGE ANYTHING FROM HERE ==========
key avi = NULL_KEY; // who to use
integer menu_chan = -1; // channel to use in the menu
integer listen_num = -1; // menu listen event handler

//==============================================
create_menu(string menu_message,list menu_button)
{ // function used to create menu to "user", given a "menu_message" and "menu_button"
menu_chan = 0 - (integer)llFrand(2147483647);
listen_num = llListen(menu_chan,"", avi,"";);
llDialog(avi, menu_message, menu_button, menu_chan);
llSetTimerEvent(reset_time); // sec timer used to in case the "ignore" button is pressed or time out
}
//==============================================

default
{
state_entry()
{
llListenRemove(listen_num); // just to save resources
llSetTimerEvent(0.0); // stop the timer in case it crosses state
}
collision_start(integer num_detected)
{
avi = llDetectedKey(0);
state menu;
}
}

state menu
{
state_entry()
{
create_menu(menu_message,menu_button);
}
timer()
{
state default;
}
}
conor Bradley
That other guy
Join date: 31 May 2006
Posts: 22
09-10-2009 17:11
WOw thanks alot man, works great :D