|
Joakim Yakan
Fast learner
Join date: 2 Oct 2006
Posts: 31
|
10-05-2006 05:07
Hello!
I wonder how I can make a function like the ones used in camping chairs. I am going to make a tipbox, and when the avitar attached to that tipbox get a tip from an other avitar, the tipbox will keep the money until the avitar (do something like stand up etc.).
Any suggestions?
|
|
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
|
10-05-2006 09:11
the objects never keep any money
When an avatar stands up from a camp chair, the money is transfered to them directly from the owner of the chair. Any money given to an object such as a tip jar goes directly to the owner of that jar. Then any script that might be in place can send all or part of it elsewhere or refund the tipper depending on what is needed, but again it comes back out of the owner of the object.
So unless this tip box is to be attached by someone who isn't the owner (can that be done? only by sitting on it i think) then this is a mute point. You can, however have the script reset the running total when they unattach, or stand up.
If however you want the proceeds or part of the proceeds to go to someone else, use the llGiveMoney() function
|
|
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
|
10-05-2006 10:23
Well - it depends on what you are doing and you were not too specific about it. The way I read you you want an avatar sitting on something and give him a reward when he or she gets up.
I freely admit to be of the kinky persuasion and one thing I have had on my mind (but no time yet to do) was to have a slave display stand which would give the slave some money while he/she is in the display stand. This was supposed to be a two part thing - one part of the reward should be time based - the other would be tip based.
To prevent the avatar from receiving tips directly you'd have to encase them, so that noone can click on them but can only click on the display stand and use it as a tip thing.
If you are the owner, every tip will go directly to you. You can use the money event, however, to see how much you got and you can add that up. I'd have used a minimum timer for tip payout.
So - let us say the user remains 30 minutes in the display box while the minimum limit is 60 minutes. The user would get his time money but I'd keep the tips. If the user had stayed 60 minutes he(she would have received the time money as well as the accumulated tips.
Use the money event to check how much *you* got.
Use llGiveMoney() to hand out money to someone else - you must grant the approriate permissions to the object, though.
|
|
Joakim Yakan
Fast learner
Join date: 2 Oct 2006
Posts: 31
|
10-06-2006 03:56
Ok, thanks for answering my question!
|