Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

detecting object in someones inventory

Varcyon Blackburn
Registered User
Join date: 24 Jan 2008
Posts: 1
04-29-2008 15:40
I am trying to figure out how to make a door that only opens when you have a specific object in your inventory.

you click the door
if you have key1 key2 and key3 in your inventory
door opens.

help?
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
04-29-2008 15:59
Ya can't do that or you could know everything I have been keeping secret. And that wouldn,t be nice peeking in there.
I think you could do that with an attachment though.
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
04-29-2008 16:17
From: Varcyon Blackburn
I am trying to figure out how to make a door that only opens when you have a specific object in your inventory.

you click the door
if you have key1 key2 and key3 in your inventory
door opens.

help?

You can't check inside someone's inventory. You can make it so they have to WEAR X Y and Z to open it, but not just have it.
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
04-29-2008 16:29
From: Keira Wells
You can't check inside someone's inventory. You can make it so they have to WEAR X Y and Z to open it, but not just have it.

Just what I said.
Malia Writer
Unemployed in paradise
Join date: 20 Aug 2007
Posts: 2,026
04-29-2008 17:12
Something like this is used in the Pot Healer Adventure / Numbakulla quest.
You might try checking with the creators of that sim to see if they can assist you.

In that quest you must wear an attachment that you are given at the beginning of the quest. The attachment tracks the items you take into your inventory relating to the quest, and you can access or not access certain areas based on which items you have obtained. You can remove the attachment when not in that sim and put it back on when you go back and it saves your progress.
_____________________
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
04-29-2008 17:46
The scripts are really easy.

Script 1 (key) has a listen on channel YYY.

Script 2 (Door) has a listen on channel XXX and upon either a touch or collision event llSays on channel YYY:

"Have a key"

(key) hears that and llSays on channel XXX:

"Open Sesame"

if (door) doesn't hear a response within zz.z seconds then it says:

"You can keep knockin, but you can't come in!"

If you are interested in scripting it your self then let us know here. If you need someone to script it for you then you can place an ad in Employment Ops or Products Wanted and someone can whip them up for you.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Grace Loudon
Registered Know-it-All
Join date: 16 Dec 2005
Posts: 99
04-30-2008 05:24
Blue Meili made something like that exactly for me when I was creating quests for my old sim Everwind. People had to run around and collect keys, then they had to "present" all of those keys, in order even, to open a big chest. It worked wonderfully. Definitely contact him about it.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
04-30-2008 08:57
You can also use an attachment to keep track of what an avatar has collected if there are scripted objects giving those objects to the avatar. Just use a chat interface to make sure: 1.) the avatar is wearing the attachment when the object is given (otherwise don't give the object), and 2.) the attachment is informed when the object is given to the avatar. Yes, in a way it is cheating because it really has nothing to do with resident inventory; just messaging. The resident could delete the objects received and conceivably be out of luck later or "fool" the system. Design your use cases and activities accordingly.

EDIT: In fact, you could do it completely WITHOUT inventory objects; just have a HUD display a little key or something. Make your own "inventory."
Malia Writer
Unemployed in paradise
Join date: 20 Aug 2007
Posts: 2,026
04-30-2008 16:36
From: Grace Loudon
Blue Meili made something like that exactly for me when I was creating quests for my old sim Everwind. People had to run around and collect keys, then they had to "present" all of those keys, in order even, to open a big chest. It worked wonderfully. Definitely contact him about it.

Oooooh, are the quests still there? :D
_____________________
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
04-30-2008 18:20
or you could have the "door" remember who "has a key" by having their "key" (UUID) on file in the door script's memory.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura