Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Notecard Giver?

Leonard Oxberger
Registered User
Join date: 10 Apr 2006
Posts: 10
04-13-2006 09:30
I want to make an object that gives out a notecard when touched. I am sure it is a very simple script but I can't seem to find anything on it. Thanks,
Marcus Moreau
frand
Join date: 25 Dec 2004
Posts: 602
04-13-2006 09:35
Put the notecard in the object, and then make a new script as follows:

CODE

default
{
state_entry()
{

}

touch_start(integer total_number)
{
llGiveInventory(llDetectedKey(0), "Notecard Name");
}
}
_____________________
Marcus Moreau

Disenfranchised island owner...

"This statement is false."
User #121869 or something close
Leonard Oxberger
Registered User
Join date: 10 Apr 2006
Posts: 10
04-13-2006 09:49
Thanks man, that is exactly what I needed.
SteveR Whiplash
teh Monkeh
Join date: 24 Sep 2004
Posts: 173
04-13-2006 12:58
If your object only has 1 notecard in it, you can use the following code which just gives the only (technically the first, but you only have one) notecard in the object. This way you can just drop the script into your notecard givers without having to edit the script every time.

giveNotecard
CODE

default
{
touch_start(integer num_detected){
llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_NOTECARD, 0));
}
}
_____________________