|
Demian Sugarbeet
Registered User
Join date: 17 Oct 2007
Posts: 12
|
11-08-2007 02:38
Hello, i am trying to make a script for a dancers/singers table where one can tip as well.
A dancer gets on the table an can choose an animation from a menu and change it everytime that touches the table. PPl seing the spectacle can tip the dancer/singer by paying the table.
When dancer ends, the script should give them their tips and here is where i have the problem.
I get PERMISSION_DEBIT for the object when i initialize it ... (start_entry) .... then when a dancer gets over the table and choose an animation i get the PERMISSION_TRIGGER_ANIMATION everytime that wants to change animation ... when they choose "STOP" as animation ... i try to llGiveMoney() to the dancer/singer but it says PERMISSION_DEBIT is not set .... ¿is possible to mix PERMISSIONS on a script??? ¿ anyone knows how???? ....
Thank you verymuch for your help!!!
|
|
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
|
11-08-2007 04:26
It depends on wich place are you asking for permissions...on state_entry if you take the object back and rezz it again it wont be triggered.
state_entry () is launched when script is resetted, setted to run or re-compiled (saved) so you have to use on_rez (ingeter number) so when object is rezzed it will launch llGetPermissions.
|
|
Demian Sugarbeet
Registered User
Join date: 17 Oct 2007
Posts: 12
|
11-08-2007 05:01
Thank you Kahiro. I use on_rez as well. The problem is that if i do not ask for PERMISSION_TRIGGER_ANIMATION on the script (i take off all the code for animating avatars of it) it works perfectly.... but once i ask for PERMISSION_TRIGGER_ANIMATION it seems that it looses the PERMISSION_DEBIT and says it is not set... Also i need the PERMISION_DEBIT to be asked just once at the initilization of the object .. and not everytime the object gives money ... so i ask for it at the initilization part ... but if during script i ask for PERMISSION_TRIGGER_ANIMATION, PERMISSION_DEBIT get lost  ...
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
11-08-2007 05:14
I think you may be better off with more than one script...  "Be aware that the effects of this call [llRequestPermissions] are not additive. This means that all desired permissions must be requested for any call because the new permissions (or lack thereof) will completely replace the old permissions. Requesting permission FALSE (or 0) will result in all permissions being released and will not raise the run_time_permissions event handler."
|
|
Demian Sugarbeet
Registered User
Join date: 17 Oct 2007
Posts: 12
|
11-08-2007 07:17
You are right Pale, thank you very much. That is what i thougth but could not find it. I´ll try to get the scripts apart .... Thank you all for your help 
|
|
Demian Sugarbeet
Registered User
Join date: 17 Oct 2007
Posts: 12
|
11-08-2007 07:21
By the way .. maybe you know ... Is it possible to comunicate 2 scripts without doing it by sensor???? ... so the script with the animations could tell the new script to pay the tips to the dancer/singer??? but not for a channel, since if someone gets the channel could be telling the script to pay them ..uh? ..hehehehe ... 
|
|
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
|
11-08-2007 07:34
From: Demian Sugarbeet ...Is it possible to comunicate 2 scripts ...so the script with the animations could tell the new script to pay the tips See http://rpgstats.com/wiki/index.php?title=LlMessageLinkedNote that this function also can pass over a id key, as well as a string & integer ~ a combiation of which you could use to increase security
|
|
Demian Sugarbeet
Registered User
Join date: 17 Oct 2007
Posts: 12
|
11-08-2007 09:22
Thank you Debbie!!!!!  I´ll try that!!! .. i am getting into scripting .... and as much i do .. as much i like it!! .. Thankx again!!! 
|