|
Adman Drake
Registered User
Join date: 9 Feb 2006
Posts: 96
|
02-16-2006 13:19
I think this might be a FAQ, but I haven't found the solution. I've been hired to script some casino games, and have been having a great time doing it. I've done two games, and they generally follow the same flow, where I have a money block in the default state. When the money block is resolved, then I jump to the "in_game" state, where the game logic happens. This is off the top of my head, so don't expect it to compile:
state default {
... money(key id, integer amount) { // check money, make change if necessary
// if everything is all good, then enter the "in game" state state in_game; } }
state in_game { // do game stuff here, including payouts, etc. }
The problem is that the "Pay" option on the object stays lit and available while the game is in use. It's hard for me (as the owner) to test if money is still being accepted during this time, but it seems like it is...? I've tried to work around it by making my own "in_game" variable, which I set and test at the appropriate times, so that if someone pays while the variable is set, I refund their money, but it doesn't seem to work. Any ideas? Is this a solved problem? Thanks! Adman
|
|
Riann Maltese
!@%$#
Join date: 20 Jul 2005
Posts: 35
|
02-16-2006 13:23
Why don't you have a money event while you are in the in_game state so as it returns any money paid to it while in that state?
|
|
Adman Drake
Registered User
Join date: 9 Feb 2006
Posts: 96
|
02-16-2006 13:24
It appears I found the relevant thread here: /54/bb/35022/1.htmlSorry!
|
|
Adman Drake
Registered User
Join date: 9 Feb 2006
Posts: 96
|
02-16-2006 13:33
From: Riann Maltese Why don't you have a money event while you are in the in_game state so as it returns any money paid to it while in that state? That appears to be a workaround. I'll try that. To answer your question, the reason that I don't have a money event in my in_game state is that I expected the Pay... option to be disabled, so I shouldn't NEED one. Apparently I do. Thanks! Adman
|
|
Val Fardel
Registered User
Join date: 11 Oct 2005
Posts: 90
|
02-19-2006 20:10
When you wish to stop accepting payment just disable the pay price window, it will still show but there will be no buttons nor a payment entry area...
llSetPayPrice(PAY_HIDE, [PAY_HIDE, PAY_HIDE, PAY_HIDE, PAY_HIDE]);
|
|
Jimmy Loveless
Hello, avatar!
Join date: 1 Oct 2004
Posts: 35
|
02-19-2006 21:04
very nice, val! that hadn't occurred to me.
however, that won't totally cover you -- one can open more than one pay dialog at a time, so disabling the payment amount still won't guarantee that payments won't be made into your object at that time.
i still haven't found a good solution to this problem.
cheers, JL
_____________________
============================ NEW Klub Kaili - World class casino gaming Unique games you won't find anywhere else
|