Jump to content

More Realistic Object Giving Possible?


Randall Ahren
 Share

You are about to reply to a thread that has been inactive for 4712 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Consider a typical situation in SL where an avatar is given a drink at a bar. The way I have always seen it done is that the avatar clicks on something, such as the bar counter top. Thereafter, the avatar is given an object, e.g., a glass, which the avatar must then find in inventory and wear.

It would be more realistic if after the avatar clicks on the bar, the glass is rezzed on the bar counter top and the avatar wears the glass by clicking on it. Evidently however, this is not possible because the glass is not owned by the avatar and therefore cannot be worn by anyone except for the owner of the bar. An alternative approach is to rezz the glass on the bar, whereupon the avatar clicks the glass to have a copy arrive in the avatar's inventory and the glass on the bar derezzes. It takes two clicks instead of one, but it is a closer simulation of the actual RL process where a drink is ordered, the drink is placed on the bar, and then taken by the customer.

Are there any better alternatives? Perhaps changing sit text for the glass rezzed on the bar to say "Drink" and when the avatar selects drink, it animates the avatar? I'm thinking the avatar is just going to end up sitting on the glass.

Link to comment
Share on other sites

object rezzed and set as buy original, avatar buys it, and the script responds to the owner change by requesting attach permissions...

it's still  multiple clicks, but the object never needs to pass through inventory (technically it does, but the user won't notice) and goes perceptually from the counter to their hand.

  • Like 1
Link to comment
Share on other sites

I like it. Excellent idea. I think I will try and implement it. I just need to do a little research into the requesting attach permissions. I suppose I need something like:

changed & changed_owner{    llRequestPermissions( llGetOwner(), PERMISSION_ATTACH );}

 

 And then follow that up with runtime_permissions and llAttachToAvatar( ATTACH_LHAND );

Link to comment
Share on other sites


Randall Ahren wrote:

I like it. Excellent idea. I think I will try and implement it. I just need to do a little research into the requesting attach permissions. I suppose I need something like:


Randall, you don't need to create a script to attach.  Once the new object (cup or glass) is bought, all the avatar has to do is to click it and select "wear".   If the object is close, it will automatically go onto/into the hand and be attached..and any drink scripts will be activated, etc.

(btw, I just tested this with my alt to make sure it worked...:)

Coffee drinking-1.png

My alt (and I ) with her coffee cup she just bought and clicked "wear" to have it go into her hand.  (the animations activate as soon as it's worn)

  • Like 1
Link to comment
Share on other sites

Thanks, I will give it a try a bit later. I was experimenting with this yesterday, but did not get any further than rezzing a drink on a counter top. That is a pretty fancy looking cup of coffee you have. It's probably called the Celestial Special. That is also a nice looking pasture. It looks like you're discussing the back forty over morning coffee:

Celestial: Where are all the horses?

Alt: Someone left the gate open.

Celestial: After this coffee kicks in, we had better go round them up. 

Alt: What do you say we trade them for some Meeroos? They have short legs and can't run as fast.

Celestial: I hate those varmits. They remind me of rats.

Link to comment
Share on other sites

in the changed event, yup (although your formatting is a bit off but I have no doubt you'll get it)

@Celestial:
I know that sandbox... I still use it on occasion when I need to permission test (and I don't really like the mountains they installed... wipes out the minimap)

Link to comment
Share on other sites

I tried setting a drink for sale for L$0 and I checked the box that the original item was for sale. Thereafter, I put the drink in the inventory of a bar with a script that would rezz the drink above the bar counter top when the bar was clicked. Once the drink was rezzed I clicked on it with my avatar and bought the drink for L$0. A message popped up next informing me that I was now the owner of the drink, but the drink stayed where it was and was not deposited in my avatar's inventory. So I clicked the drink and selected wear, whereupon my avatar walked over to the drink and went crazy trying to wear that drink. To avoid the craziness I think I'm going to have to script some code that moves the drink over to the avatar.

Link to comment
Share on other sites


Randall Ahren wrote:

So I clicked the drink and selected wear, whereupon my avatar walked over to the drink and went crazy trying to wear that drink. To avoid the craziness I think I'm going to have to script some code that moves the drink over to the avatar.

Hmm,  so you weren't near the drink?  Well, yes that can end up being a bit of craziness.  

If this is a bar, I'd try this:   Have seats (barstools whatever) that the avatar sits on.  Then the drink can rezz in front of them, they click it to buy, and wear, etc.  It should work then.   I'll be inworld later this evening, and will play around with this.  If you end up getting a good solution that works for you, post back here, I'd be interested in your results.

Link to comment
Share on other sites

I was close to the drink, but not directly adjacent, and standing. My avatar starts trying to climb over the bar to get at the drink when wear is selected, and even starts flying. Sitting on a barstool is better. The avatar will rotate a little, but does not move around other than that. Unless the drink is really close though, the avatar cannot get the drink even while seated. If the drink is very close to the avatar, it appears as if the drink moves into the avatar's hand when wear is selected. I'll post a solution if I come up with something.  

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4712 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...