Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to give a notecard allowing avatar to reject it?

Eadoin Welles
Registered User
Join date: 5 Jan 2007
Posts: 149
02-28-2007 02:25
I want to do a simple object that, once touched, show a notecard and allows the avatar to accept it or reject it. I tried using llGiveInventory, but that function ALWAYS gives me the card: I have no choice. Which function should I use instead? I cannot find it in WIKI.

Thank you in advance
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-28-2007 02:30
From: Eadoin Welles
I want to do a simple object that, once touched, show a notecard and allows the avatar to accept it or reject it. I tried using llGiveInventory, but that function ALWAYS gives me the card: I have no choice. Which function should I use instead? I cannot find it in WIKI.

Thank you in advance


According to the WIKKI "If the recipient is an agent, the user then follows the normal procedure of accepting or denying the offer." So they should still have a decline button?

The other way would be to first show a dialog "Would you like a notecard" and only give it after wards.
Eadoin Welles
Registered User
Join date: 5 Jan 2007
Posts: 149
02-28-2007 02:59
From: Newgate Ludd
According to the WIKKI "If the recipient is an agent, the user then follows the normal procedure of accepting or denying the offer." So they should still have a decline button?

The other way would be to first show a dialog "Would you like a notecard" and only give it after wards.


So why, when I test the object, I *always* receive the notecard without any possibility to deny?
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
02-28-2007 04:20
Look close at the notecard window you get.

At the bottom you will see two buttons:
"Keep" and "Discard" (or something similar).

Simply closing the notecard by clicking the top right close button does the same as the "Keep" button.
Nexus Laguna
Registered User
Join date: 20 Dec 2006
Posts: 40
02-28-2007 04:37
From: Eadoin Welles
I want to do a simple object that, once touched, show a notecard and allows the avatar to accept it or reject it. I tried using llGiveInventory, but that function ALWAYS gives me the card: I have no choice. Which function should I use instead? I cannot find it in WIKI.

Thank you in advance


Best way to do this is on a click (touch_start), use

llDialog (llDetectedKey(0), "Would you like to recieve a Notecard?", ["Yes", "No"], channel);

And then llGiveInventory() on the listen event if the avatar clicked yes.... if you need more details to do this let me know and I can put a complete script up for ya... :)
Eadoin Welles
Registered User
Join date: 5 Jan 2007
Posts: 149
02-28-2007 05:43
From: Squirrel Wood
Look close at the notecard window you get.

At the bottom you will see two buttons:
"Keep" and "Discard" (or something similar).

Simply closing the notecard by clicking the top right close button does the same as the "Keep" button.


No, there are no buttons below the note, just a greyed out "Save". The note is automatically added to notecard folder. No way to reject it. The only supposition I can do is that llGiveInventory behaves differently depending on requester: if it is the object owner, no buttons are displayed....
Eadoin Welles
Registered User
Join date: 5 Jan 2007
Posts: 149
02-28-2007 05:45
From: Nexus Laguna
Best way to do this is on a click (touch_start), use

llDialog (llDetectedKey(0), "Would you like to recieve a Notecard?", ["Yes", "No"], channel);

And then llGiveInventory() on the listen event if the avatar clicked yes.... if you need more details to do this let me know and I can put a complete script up for ya... :)


Well, thank you very much, but I simply want the standard Keep/Discard behaviour which SLers are already used to. :) I am able to use llDialog, but that is not what I want. Very kind to offer, anyway.
Nexus Laguna
Registered User
Join date: 20 Dec 2006
Posts: 40
02-28-2007 05:51
From: Eadoin Welles
Well, thank you very much, but I simply want the standard Keep/Discard behaviour which SLers are already used to. :) I am able to use llDialog, but that is not what I want. Very kind to offer, anyway.


My Pleasure :) I just don't like assuming necessarily people know what I am talking about is all ... no offense intended ... as there are a fair number of new scripters using these forums and I hate being the snobbish type who just waffles on way above peoples heads :)
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
02-28-2007 09:15
It MAY be working fine already.. just not for you getting your own notecard.

I have a giver that gives a notecard. when it llGiveInventory's to me.. I get no options. I haven't tested this with a friend though.. So check and see if your friend gets the "Decline" button. You might not need to do anything.

It also might just be a matter of permissions, so if you friend doesn't see the buttons, try making it no mod or something, and see if that helps.

Edit: I just tested this in world. my friend gets the option to discard the note or keep it. when I touch the object, I do not get any such options. Since it already belongs to me I guess.

Permissions don't seem to enter into it. But I'll tell you, a no mod notecard looks kinda cool.. and most people will notice when one shows up.

CODE
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}

touch_start(integer total_number)
{
llGiveInventory(llDetectedKey(0), "New Note");
}
}
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Rumbeard Chowderhead
Registered User
Join date: 9 Apr 2006
Posts: 7
llGiveInventory
02-28-2007 14:18
when an object gives a notecard to it's owner you will not get the option but anyone else recieving it will