How I get a simple script to click a object and get a notecard?
|
Kane Kent
Registered User
Join date: 2 Jan 2005
Posts: 185
|
11-24-2005 23:00
I had object before did this can't find. I just made a simple block with a sign and I want people be able get it a get a notecard..
Also there a version for pictures.
Thanks please use full code as I don't know any coding just how to start new code in a object.
_____________________
Barrie, Ontario, Canada! Check Out my Blog! http://kanehart.com Make Comments 
|
Ginge Reymont
Registered User
Join date: 10 Oct 2005
Posts: 190
|
11-24-2005 23:59
key toucher default { state_entry() { } touch_start(integer touch) { toucher = llDetectedKey(0); llGiveInventory(toucher, "notecard"); llSay(0,"Notecard Given"); } }
It might need some editing
|
Kane Kent
Registered User
Join date: 2 Jan 2005
Posts: 185
|
11-25-2005 00:06
From: Ginge Reymont key toucher default { state_entry() { } touch_start(integer touch) { toucher = llDetectedKey(0); llGiveInventory(toucher, "notecard"); llSay(0,"Notecard Given"); } }
It might need some editing yup getting nothing 
_____________________
Barrie, Ontario, Canada! Check Out my Blog! http://kanehart.com Make Comments 
|
Ginge Reymont
Registered User
Join date: 10 Oct 2005
Posts: 190
|
11-25-2005 03:19
:/ 6 hours till im off work, ill help when i get back if no-one answers.
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
11-25-2005 03:22
default { touch_start( integer total_number ) { llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_NOTECARD,0)); } }
|
Kane Kent
Registered User
Join date: 2 Jan 2005
Posts: 185
|
11-25-2005 12:00
From: Cid Jacobs default { touch_start( integer total_number ) { llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_NOTECARD,0)); } }
no luck with that one also 
_____________________
Barrie, Ontario, Canada! Check Out my Blog! http://kanehart.com Make Comments 
|
SteveR Whiplash
teh Monkeh
Join date: 24 Sep 2004
Posts: 173
|
11-25-2005 17:39
hmm, that is correct... Technically, it gives the first notecard inside the object. If you want it to also give a picture, you could do this. default { touch_start(integer total_number) { llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_NOTECARD, 0)); llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_TEXTURE, 0)); } }
The different inventory types are in the middle of this page: http://secondlife.com/badgeo/wakka.php?wakka=inventory
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
11-25-2005 18:09
From: Kane Kent no luck with that one also  it would be helpful if you'd post more detail here. What error did it give you, if any? Did it compile but simply fail to run? ... that kind of thing.
|
Desmond Shang
Guvnah of Caledon
Join date: 14 Mar 2005
Posts: 5,250
|
11-25-2005 18:50
Also... it might be that all the permissions must be turned on - such that the notecards, textures &c can be given away. 
_____________________
 Steampunk Victorian, Well-Mannered Caledon!
|
Bertha Horton
Fat w/ Ice Cream
Join date: 19 Sep 2005
Posts: 835
|
11-26-2005 20:55
I got mine to work after about two hours, but I don't have the script handy... it's along the lines of the ones on this page though. The name ("notecard"  must match the name and case of the card.
_____________________
Trapped in a world she never made!
|
Phantom Enigma
Registered User
Join date: 18 Nov 2005
Posts: 25
|
notecard from where?
11-27-2005 08:49
What inventory does the notecard come from. Do you have to somehow 'load up' the object with notecards? or does it pull from your personal inventory (and the next users if you give it away)?
Thanks,
PhE
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
11-27-2005 10:45
You have to put the notecard in the contents of the object too - same place you put the script. Just drag from your inventory into the contents (or, for a notecard and a few other things but not EVERYTHING) onto the object.
|