Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Payment dialog on sit

Random Cole
Virtual Citizen
Join date: 6 Jun 2005
Posts: 14
12-22-2005 19:20
I have an object that I want the user to sit upon to start an animation and then have the payment dialog pop down to ask for payment. Is there any way to trigger the pay dialog upon sit?

I am trying to avoid the user having to both select payment and select sit from the pie menu. This is my first post here but I wanted to say that I read this forum section all the time and thank you for all of the great information and the time it takes to place it here.
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
12-22-2005 20:43
Hey random,

I'm a little confused by your question. I believe that the only way for someone to pay money using an object/script is to use either the buy or pay wheel options. I don't know of a way to ask the user to pay via a dialog box. Am I wrong about that?
_____________________
imakehuddles.com/wordpress/
Random Cole
Virtual Citizen
Join date: 6 Jun 2005
Posts: 14
12-22-2005 21:03
No you're right the only way I know to begin a payment from a user is for the user to use the pie menu. But by dialog box I meant the payment interface which appears after selecting from the pie menu. I was hoping there might be another way to trigger that interface that I had simply not known of. I suppose it was just wishful thinking.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
12-22-2005 21:14
I wish we could trigger that interface on call, but it's not possible as of hte current LSL...
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
12-22-2005 21:42
yea it would be nice, apon need have the pay object/person box appear, not hope they know when and which prim to right click.
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
12-22-2005 21:50
What if the user paid the object, and then teh object requested permission to animate the avatar and positioned it in an appropriate spot with an appropriate animation? (This assumes an object can move a non-sitting avatar, I'm not sure if this is possible)
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
12-23-2005 06:02
From: Random Cole
No you're right the only way I know to begin a payment from a user is for the user to use the pie menu. But by dialog box I meant the payment interface which appears after selecting from the pie menu. I was hoping there might be another way to trigger that interface that I had simply not known of. I suppose it was just wishful thinking.
It is obviously a security guard that the pyament system is not simple. If you can give the object to your customer first, you can use llRequestPermissions(llGetOwner, PERMISSION_DEBIT). It would be also possible that you set it under changed event.
But consider this. Easy payment system brings us swindle. ;)
_____________________
:) Seagel Neville :)
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
12-23-2005 07:56
I think you'll just have to go with the sit then pay option. Upon sit the object could request payment, and wait 30 seconds, if no money is received then it unsits the avatar currently on it.
All you'd really need to do then is have a money(key id,integer amount) event and if id is equal to llAvatarOnSitTarget() and the amount is sufficient, change state (or otherwise do something). If the money isn't enough then give it back, or take a note of how much was paid and wait for some more to go in.
Random Cole
Virtual Citizen
Join date: 6 Jun 2005
Posts: 14
12-23-2005 10:01
Yeah I have just resigned myself to changing my original concept, although you're right Haravikk that is exactly how I could go about it otherwise and there is nothing so bad about that.
But, Seagel, I don't see that the feature I was originally looking for is insecure. I wasn't wanting an instant debit upon sit, I was just wanting a way to open up the payment interface which would still have to be utilized by the user before any transaction could take place. Although I do see how changing that system without proper planning could create unwanted side effects. But similar to the way that perm is granted for animation of an av upon sit, I was thinking it would be nice if we could simply ask the user if they would like to pay for some action upon sitting. They could always refuse to pay. It would make a few projects that I have in the works smoother in the way that they interact with customers.
But I agree with you Seagel in the sense that the last thing I want is for the payment system to be able to spam anyone or for debits to be automatically triggered. It would be hard to develop in SL if users lost trust in the basic payment systems. If faced with the choice I definitely choose security over convenience when it comes to money.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
12-23-2005 10:29
From: Random Cole
But similar to the way that perm is granted for animation of an av upon sit, I was thinking it would be nice if we could simply ask the user if they would like to pay for some action upon sitting. They could always refuse to pay. It would make a few projects that I have in the works smoother in the way that they interact with customers.
I suspect this point. Acceptance and refusal are so easy that some ppl wouldn't make sure and accept it as if they do animations. We should perform the act of paying actively. I know you've already understood this though. :)
_____________________
:) Seagel Neville :)
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
12-24-2005 03:31
Well, the payment dialog isn't the same as a normal dialog, it appears in the middle of the screen. I think so long as you could only request it once per 'sit' (ie when someone sits on the object you get one money request until they stand up and someone else sits down) then it wouldn't be so bad. Someone could choose to not pay and the script can give them a message saying "This chair isn't free! Please pay me or I will kick you off!" or such, then they would pay it normally to avoid being booted off.

So long as the dialog is kept different from other dialogs it shouldn't be a problem really.

The llShowPayDialog() function would then of course only work if the state it is within has a money event to handle it.


On a sort of side-note, do scripts still leave an object's "Pay" option enabled if they transition to another state which doesn't have one?
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
12-26-2005 13:38
From: Seagel Neville
I suspect this point. Acceptance and refusal are so easy that some ppl wouldn't make sure and accept it as if they do animations. We should perform the act of paying actively. I know you've already understood this though. :)
Yeh, people get used to clicking on routine dialog boxes. I hate the way web browsers ask "do you realy want to do $VERYSTUPIDTHING", instead of making it so that stupid things (like opening attachments in Word) required a completely different kind of operation (like, saving the file to disk and opening it in another program) from browing a web page.

I'd rather do it the other way, with an "llSit()" command.
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
12-27-2005 03:02
Random, I dunno what your actual application is, so this might not work - but one way to disguise the akwardness of two steps is to involve the user in such a way that you "entertain" him. This sort of thing often turns flaws into features.

As an example, have the seat stowed away under the table where it can be seen but not used. When payment is made the seat slides out, thanks the av for payment and invites him to have a seat.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
12-27-2005 05:34
As I said, if you give it for free first, you can do this below.
CODE
key TrueOwner;
string ANIMATION;
integer is_sitting;
integer Price = 100;

default
{
state_entry()
{
ANIMATION = llGetInventoryName(INVENTORY_ANIMATION, 0);
is_sitting = FALSE;
llSitTarget(<0, 0, 0.5>, ZERO_ROTATION);
if(TrueOwner != llGetOwner())
{
llSetText("This will be vanished unless you buy. Price is L$" + (string)Price,<1,1,1>,1);
}
}
changed(integer change)
{
ANIMATION = llGetInventoryName(INVENTORY_ANIMATION, 0);
if(change & 128)
{
llResetScript();
}
if(change & CHANGED_LINK)
{
key av = llAvatarOnSitTarget();
if(av != NULL_KEY)
{
llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION);
}
else
{
if((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && is_sitting)
{
if(TrueOwner != llGetOwner())
{
is_sitting = FALSE;
llStopAnimation(ANIMATION);
llWhisper(0, "Do you like me? Get me for L$" + (string)Price + ", Plz.");
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
llSetTimerEvent(15);
}
else
{
is_sitting = FALSE;
llStopAnimation(ANIMATION);
}
}
}
}
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
is_sitting = TRUE;
llStopAnimation("sit_generic");
llStopAnimation("sit");
llStartAnimation(ANIMATION);
llSetText("",<1,1,1>,1);
}
}
timer()
{
llSetTimerEvent(0);
llGiveMoney("YourOwnKeyHere", Price);
state CheckOut;
}
}

state CheckOut
{
state_entry()
{
if(llGetPermissions() & PERMISSION_DEBIT)
{
llWhisper(0, "Thank you for purchasing me. Now you're my owner.");
TrueOwner = llGetOwner();
state default;
}
else
{
llWhisper(0, "Sorry, I hope you'll get another chance to get me. Bye for now.");
llDie();
}
}
}
_____________________
:) Seagel Neville :)