Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Haha, probabaly a VERY beginner-type question... Pop-up notecards?

Teeka Fox
Registered User
Join date: 27 Feb 2005
Posts: 43
03-30-2005 01:57
Hiya!

I'd like to find a way to have an item pop up a notecard when it's clicked. Can anyone help me out?

Thanks a BUNCH! :D

==Teeka
Kris Ritter
paradoxical embolism
Join date: 31 Oct 2003
Posts: 6,627
03-30-2005 02:06
yeah. basically llGiveInventory (gDetectedKey,"notecard";)

read da wiki ! :)
Teeka Fox
Registered User
Join date: 27 Feb 2005
Posts: 43
03-30-2005 02:07
Thanks a lot! :D
Teeka Fox
Registered User
Join date: 27 Feb 2005
Posts: 43
03-30-2005 02:14
Erf...after looking stuff over, I still have NO idea what I'm doing. I've never scripted at all before, so looking at this stuff just makes my head spin.

All I need is someone to tell me, line by line, what I need to do. I'm not planning on learning scripting anytime soon...I'm an artist, not a programmer. XD
Laukosargas Svarog
Angel ?
Join date: 18 Aug 2004
Posts: 1,304
03-30-2005 02:28
This will give a notecard to anyone except the owner of the prim containing the script.
After all, you don't want to see it every time you move it !
Create a new script and replace its contents with the following ...




string g_note_name = "replace this bit between the quotes with the notecard name";

default
{
on_rez ( integer param )
{
llResetScript();
}

touch_start( integer total_number )
{
key scriptOwner = llGetOwner();
key toucher = llDetectedKey(0);

if ( toucher != scriptOwner )
llGiveInventory( toucher, g_note_name );
}
}
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
03-30-2005 02:50
If you want a simple notecard giver that doesn't require configuration:
CODE

//This will give the first notecard found in inventory.
default
{
touch_start(integer r)
{
llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_NOTECARD, 0));
}
}