Are your pose ball alright?
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
03-30-2006 07:05
I made sure the run_time_permissions executed whenever you stood up before it recognized llAvatarOnSitTarget turns to be NULL_KEY. So it ended up always giving you permission errors. Did you all make sure it? [EDIT]Aww... this trouble might happen with only mine. Mine is set not only PERMISSION_TRIGGER_ANIMATION, but also PERMISSION_TAKE_CONTROLS. Then, when you sit on the ball, "perm" of the run_time_permissions(integer perm) returns "20", but when you stand up, it returns "16". So I set the if state, if(perm == 20), and solved it. I wish this would never changed at the next version. I don't want to change it again. 
_____________________
 Seagel Neville 
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
03-31-2006 17:06
Aww... So every vehicle script must get this trouble if they use the following run_time_permissions event. run_time_permissions(integer perm) { if(perm) This must be changed like following, mustn't it? run_time_permissions(integer perm) { if(perm == (PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS))
_____________________
 Seagel Neville 
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
04-01-2006 20:10
Just as a start, yes, yuo should use the full test. You also need to make sure that you're not setting yourself up the bomb with something like this: Let's say you originally coded the routine to need animation permission. Then later on you decide to add some vendor code borrowed from soneone else, so you can make a vehicle that people can pay for rides on. Now say the vendor code you include does smething like this... vendor_setup() { //... llRequestPermissions(llAvatarOnSitPoint(), llGetPermissions() | PERMISSION_DEBIT); }
If you call that AFTER you call your vehicle setup, you'll get TWO run_time_permission events with your expected permissions in there. Request permissions as early as you can, and use run_time_permissions() only for actions that are serially reusable. Setting an animation, sure. It doesn't matter if you start the same animation twice. Taking controls, OK, that's cool. But actually starting movement or applying an impulse... no, you need to avoid that.
|
Jenny Carlos
Registered User
Join date: 30 Aug 2005
Posts: 52
|
Not sure if your saying the update messed something up
04-01-2006 22:04
I have many weapons and other scripts that request perms for anims and controls both and about half of them in my inventory including my best seller is giving take controls errors now after this last update.
Is there a reason why?
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
04-01-2006 23:31
From: Jenny Carlos I have many weapons and other scripts that request perms for anims and controls both and about half of them in my inventory including my best seller is giving take controls errors now after this last update.
Is there a reason why? Quite likely it's the same problem listed here. I've even found Linden scripts that have this bug. run_time_permissions can be called at any time. Don't use it as part of a lockstep process.
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
04-02-2006 00:06
From: Argent Stonecutter run_time_permissions can be called at any time. Don't use it as part of a lockstep process. hmm... but I expect that it can be called just after requesting permissions. When I stand up, I don't request permissions. 
_____________________
 Seagel Neville 
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
04-02-2006 10:38
What you do is you make each action based on a set of prerequisites, and every time any of the prerequisites are fulfilled you attempt the action. For example, if you want to make a vehicle start moving when the user has sat down and touched a control, you have three prerequisites: 1. The user is sitting. 2. You have the permissions you need. 3. The user has touched the control. You don't know the order in which these operations will happen, and they may be repeated ... for example, users press buttons like monkeys on crack if you let them. So what you do is you write the code so that whe the user sits, you set the "user is sitting" flag in the change event. When the user has given you permissions, you set the "user has granted permissions" flag. When the user touches, you set the "user has touched flag". Then after setting each flag, you call this routine: final_check() { if(user_sitting && permissions_granted && start_touched) light_blue_touch_paper(); }
|
Hunter Stern
Web Weaver
Join date: 7 Oct 2004
Posts: 377
|
04-02-2006 11:14
Im getting a similar error with Take Controls which require Permissions to the effect that the script in wich the message is sent to isn't being found, even though the script is plainly there. so Im marking it off as a warning . As far as Poseballs,.. I recently was setting my land access for my group and one of the people I was adding to the list was sitting on one of my couches which has pose balls. I accidentally hit allow these avatars before i got through adding thier name and POOF they were ejected, but so was my couch After some hunting underground we finally found the errant counch in the sim border so we touched it and it reapeared in its original spot. So out of curiousity, I sat on the pose ball my guest had been sitting on and sure enough. the pose is now mis-aligned  Im sure a quick edit rotate will fix the problem but still the whole ordeal of it all...
|