Thursday, 1 May 2014

script to create a note card giver in Second Life

script  to create a note card giver in Second Life






1
string notecard = "Welcome Notecard";

default
{
    state_entry()
    {
       llSetText("Welcome to Notecard", <1,1,1>, 1.0);
    }

    touch_start(integer total_number)
    {
      llGiveInventory( llDetectedKey(0), notecard);
    }
}
2
when you touch the object, it gives error:
Unable to give inventory: 'No item named 'Welcome Notecard'.'.
3
solution:
put the notecard in the inventory box
4
click on inventory -> my inventory -> right click on notecards -> new notecards
in the name, type Welcome Notecard
description: notecard
Touch notecard giver


save the notecard.
drag notecard1 to contents folder.

5
now if you touch the object, it gives message:


Remember: your note card name has to be same as notecard string name


No comments:

Post a Comment