Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help Need A Script

Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
10-12-2006 11:51
If anyone can assist me or point me in the right direction, I would greatly appreciate it. I am looking for a script (probably sometype of give script) that can be put in to an invisible phantom object where when an AV passes thru that object a note card is automatically given. Please IM me in game if you can assist. Thank you in advance. Morgaine Christensen
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
10-12-2006 12:15
The function you want is llVolumeDetect, and then llGiveInventory on the collision_start() event.

http://lslwiki.com/lslwiki/wakka.php?wakka=llVolumeDetect
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Island Granville
Registered User
Join date: 25 Mar 2006
Posts: 86
10-12-2006 12:54
I was going to make something like this for myself in the next day or two. I can contact you in-world if you'd like, in case you are still looking.
Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
Wonderfull
10-16-2006 13:11
From: Island Granville
I was going to make something like this for myself in the next day or two. I can contact you in-world if you'd like, in case you are still looking.


Wow, that would be great! I found a collison script but I can't put it in a phantom object. If you develop one and will IM that would be great. Thank you.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-16-2006 15:39
With llVolumeDetect you get the phantoming in a special way so collision events will fire. Any prim you set to phantom by other script calls or by clicking the check box on the edit panel will stop collision events firing. The whole thing about phantom is you *can't* collide with it... that's why you can walk through.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
10-17-2006 00:14
Very simplified version. Gives first notecard.
Could be expanded altered to give its entire contents quite easily using the give all script.

CODE


string notecard

default
{
state_entry()
{
llVolumeDetect(TRUE);
notecard = llGetInventoryName(INVENTORY_NOTECARD, 0);
}

collision_start(integer total_number)
{
integer i;
for(i=0;i<total_number;i++)
{
key id = llDetectedKey(i);
llGiveInventory(id, notecard);
}
}

Changed(integer change)
{
// Test for a changed inventory
if (change & CHANGED_INVENTORY)
{
llResetScript();
}
}

}