Script error? whats wrong?
|
|
Sky Eclipse
Registered User
Join date: 30 Oct 2006
Posts: 123
|
03-06-2007 10:30
I have a bar, with 5 seats, each seat has a pose script in it and a pose (no pose ball) ... all positioned, named and functioning correctly. All the prims are linked.
When the AV sits on the stool (containing the pose script with targets and the pose) i get errors above all the seats. The AV does however sit as it should.
the error reads
Stool: Script trying to stop animations but PERMISSION_TRIGGER_ANIMATION permission not set
Whats wrong with it?
as far as I can see everything is in place.... the script and pose are full perm as is the furniture......
Im confused, if anyone can help it would be much appreciated, thankyou.
|
|
Island Granville
Registered User
Join date: 25 Mar 2006
Posts: 86
|
03-06-2007 10:34
Have you tried resetting the scripts? (tools menu)
|
|
Sky Eclipse
Registered User
Join date: 30 Oct 2006
Posts: 123
|
03-06-2007 10:43
yes, I just tried that now, thankyou for the suggestion but it didnt seem to make a difference.
Sky x
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
03-06-2007 11:58
Poor scripting. Each script should be checking to see the condition of its sit target before making any assumptions about having its changed() event triggered. Instead, they each assume they are the one single prim on the object that might be sat opon.
Post the script itself.
|
|
Sky Eclipse
Registered User
Join date: 30 Oct 2006
Posts: 123
|
03-06-2007 13:52
OK here it is  // USER CONFIG \\ string posename = ""; // Pose name as it is in your inventory. string sittext = "Chill out"; // Name on the pie menu. string hovertxt = "Sit"; // The text that appears above ur Poseball. vector position = <-1.10607, -0.00528, -0.40160>; // How far away avatar sits on it (X, Y, Z). rotation avrotate = <0.62584, 0.33622, -0.66422, -0.23256>; // The Rotation the avatar sits on the Ball. // END CONFIG! \\ integer hidden = TRUE;default{state_entry(){llSitTarget((vector)position,(rotation)avrotate);llSetSitText(sittext);}changed(integer change){if(change & CHANGED_LINK){key avataronsittarget = llAvatarOnSitTarget();if(avataronsittarget != NULL_KEY ){llRequestPermissions(avataronsittarget,PERMISSION_TRIGGER_ANIMATION);llStopAnimation("sit"  ;llStartAnimation(posename);if(hidden == TRUE){}else llSetText("",<1,1,1>,1);}else{llStopAnimation(posename);llSetText(hovertxt,<1,1,1>,1);}}}run_time_permissions(integer perm){if(perm){llStopAnimation("sit"  ;llStartAnimation(posename);}}} Im sure that all means something to someone  Thanx!
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
03-06-2007 14:05
Ack! // USER CONFIG \\ string posename = ""; // Pose name as it is in your inventory. string sittext = "Chill out"; // Name on the pie menu. string hovertxt = "Sit"; // The text that appears above ur Poseball. vector position = <-1.10607, -0.00528, -0.40160>; // How far away avatar sits on it (X, Y, Z). rotation avrotate = <0.62584, 0.33622, -0.66422, -0.23256>; // The Rotation the avatar sits on the Ball. // END CONFIG! \\
integer hidden = TRUE; default { state_entry() { llSitTarget((vector)position,(rotation)avrotate); llSetSitText(sittext); }
changed(integer change) { if(change & CHANGED_LINK) { key avataronsittarget = llAvatarOnSitTarget(); if(avataronsittarget != NULL_KEY ) { llRequestPermissions (avataronsittarget, PERMISSION_TRIGGER_ANIMATION); llStopAnimation("sit"); llStartAnimation(posename);
if(hidden == TRUE) { } else llSetText("",<1,1,1>,1); } else { llStopAnimation(posename); llSetText(hovertxt,<1,1,1>,1); } } }
run_time_permissions(integer perm) { if(perm) { llStopAnimation("sit"); llStartAnimation(posename); } } }
/me guesses it's doing animation stuff in the changed event..
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-06-2007 14:18
Yep, Pretty standard Poseball stuff, Although casting a vector to a vector and a rotation to a rotation is a new twist!
The llStopAnimation and llStartAnimation inside the changed event are superflous as they are also in the run time permissions event handler.
|
|
Sky Eclipse
Registered User
Join date: 30 Oct 2006
Posts: 123
|
03-06-2007 14:42
So.. what does that mean? can i fix it? lol, u guys lost me after 'Ack!' But thanx for the help.... Im confident it will help when i know what your saying  Cheers Sky x
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
03-06-2007 15:01
This aught to do: // USER CONFIG \\ string posename = ""; // Pose name as it is in your inventory. string sittext = "Chill out"; // Name on the pie menu. string hovertxt = "Sit"; // The text that appears above ur Poseball. vector position = <-1.10607, -0.00528, -0.40160>; // How far away avatar sits on it (X, Y, Z). rotation avrotate = <0.62584, 0.33622, -0.66422, -0.23256>; // The Rotation the avatar sits on the Ball. // END CONFIG! \\
key sitter = NULL_KEY; // Records our sitter's key
default { state_entry() { llSitTarget(position, avrotate); llSetSitText(sittext); }
changed(integer change) { if(change & CHANGED_LINK) { key avataronsittarget = llAvatarOnSitTarget(); if(avataronsittarget != NULL_KEY && sitter == NULL_KEY ) // If the sit target is filled, and we've no record of a sitter, NEW SITTER! { sitter = avataronsittarget; llRequestPermissions (avataronsittarget, PERMISSION_TRIGGER_ANIMATION); llSetText("",<1,1,1>,1); } else if ( avataronsittarget == NULL_KEY && sitter != NULL_KEY ) // If the sit target is empty, and we've a record of a sitter, SITTER HAS STOOD UP! { sitter = NULL_KEY; if ( llGetPermissions() & PERMISSION_TRIGGER_ANIMATION ) // Keeps it quiet if SL took away this perm already { llStopAnimation(posename); } llSetText(hovertxt,<1,1,1>,1); } // Otherwise, this changed event isn't relevant to us, and we can just ignore it. } }
run_time_permissions(integer perm) { if( perm & PERMISSION_TRIGGER_ANIMATION ) { llStopAnimation("sit"); llStartAnimation(posename); } } } I'm not in-world, so I can't test this.
|
|
Sky Eclipse
Registered User
Join date: 30 Oct 2006
Posts: 123
|
03-06-2007 15:27
OK, Thx v much... i will give it a go and let u know!
Cheers Sky x
|