animation bugs when object is transfered? wtf?
|
|
Naryu Yue
Interrupted?
Join date: 23 Jul 2007
Posts: 15
|
09-04-2007 09:36
This is probably a noobish question, but I swear I searched and found anything like this...
I have a tree-thiny which ppl is supposed to plant. They receive an object (tree). they are supposed to place it where it goes, then "sit" on it. The animation for kneeling starts, and theres some rezzing temp objects involved, so it looks like the avvie is making a hole on the ground and putting the tree in, an then filling up with earth.
so far, so good. I tested the script myself and it works just fine. Then I go and transfer one to my collegues. with permissions set so they can copy and transfer but not mod it. kk. all the objects in the inventory (including the script) have the same permissions set. ok?
when i plant my tree, it works. if i rez a tree and someone else plants it, it works. when i transfer the tree to someone and they rez and plant it, it bugs.
bugs as in: the animation for kneeling wont start, they just sit downm with default sititng animation and script remais frozen...
any ideas how to fix it? (i do really really need to transfer copies of the tree to people, itys supposed to be a gift-thingy for this island im working on.
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
09-04-2007 09:54
From: Naryu Yue when i plant my tree, it works. if i rez a tree and someone else plants it, it works. when i transfer the tree to someone and they rez and plant it, it bugs.
bugs as in: the animation for kneeling wont start, they just sit downm with default sititng animation and script remais frozen... I know the post said this, but just to be sure: the animation has transfer permission, right? so the tree someone else rezzes really does have that anim inside? (If not, it should have thrown an error message, too, fussing about missing the anim.) If it's not that, I'm thinking a view of the script may be necessary. It sounds like it's doing the right thing about getting PERMISSION_TRIGGER_ANIMATION, since it works for them when you rez the tree, but leaving the avatar with the default sit pose sure seems like it's falling through the CHANGED_LINK condition--but only if the owner isn't the creator, which just doesn't seem likely unless there's an inventory permission problem.
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
09-04-2007 10:11
Permissions bug in the script jumped to mind but she (she?) says it works if she rezzes it and somebody else sits on it.
Does the script care about who owns the object? Maybe you need to do an llResetScript in the changed event to pick up a change in owner..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Naryu Yue
Interrupted?
Join date: 23 Jul 2007
Posts: 15
|
09-04-2007 10:44
@Qie's question: yep, the kneeling animation is not modifiable, but it is copyable/transfereable... I double cehcked :x @Meade: yes, Naryu is a she xD and nope, it doesnt check the owner or anything... see the code below, plz, its the whole thing. I thought at first it was some weirdness regarding invetory permissions, so i set the whole inventory permissions for "next owner" exactly the same as i have on the objects, and thought that if those permissions work for me, they would work for everyone else... :/ integer permissionResult; string theAnim = "Basic Kneeling"; key avie;
default { state_entry() { llSetSitText("Plantar"); llSitTarget(<0.4, 0.5, 0.5>, llGetRot()); }
touch_start(integer total_number) { key who = llDetectedKey(0); llGiveInventory(who, "Plantando a Arvore"); } changed(integer change) { // something changed if (change & CHANGED_LINK) { // and it was a link change llSleep(0.5); // llUnSit works better with this delay avie = llAvatarOnSitTarget(); if (avie != NULL_KEY) { // somebody is sitting on me llRequestPermissions(avie,PERMISSION_TRIGGER_ANIMATION); } else { if (permissionResult) { llStopAnimation(theAnim); llResetScript(); } }
} } run_time_permissions(integer value) { //Check to see if we got permission to animate the avatar if (value == PERMISSION_TRIGGER_ANIMATION) { llSay(0,"aff"); //Set the permission flag for use later. permissionResult = TRUE; //Stop the default "sit" animation llStopAnimation("sit"); //Start the animation we want to use. llStartAnimation(theAnim); llSay(0,"Isso... plante-me com cuidado..."); llSleep(3); llRezObject("Buraco",llGetPos(),ZERO_VECTOR,llGetRot(),42); llSleep(6); llSetPos(llGetPos()-<0,0,0.4>); llRezObject("Montinho",llGetPos()+<0,0,0.4>,ZERO_VECTOR,llGetRot(),42); llSay(0,"Me sinto bem agora!"); llSleep(3); llUnSit(avie); llSay(0,"Obriagda por me plantar, "+llKey2Name(avie)+"!"); llRezAtRoot("Arvrinha",llGetPos(),ZERO_VECTOR,llEuler2Rot(<0,90,0>*DEG_TO_RAD),42); llDie(); } else { llSay(0,"oops!"); } } }
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
09-04-2007 10:58
Couple things, may or may not be the problem:
Better to check
if (value & PERMISSION_TRIGGER_ANIMATION)
instead of "==", just in case somehow there's another permission gotten somewhere. (Doesn't seem like the problem here, though... sorry.)
And if the parcel where the tree gets rezzed allows "build" only by the group or owner, then the llRezAtRoot would work for an object owned by you, but not for one owned by somebody not in the group.
(I'll stare a bit longer at that run_time_permissions handler, but wanted to get out some quick feedback, in case it helps at all.)
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
09-04-2007 11:05
/me starts to reply but sees that Qie beat her to it, with almost the exact same reply she was going to use.
edit: /me suggests adding a llSay (0, "permissions event got " + (string)value); as the first line in run_time_permissions.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Naryu Yue
Interrupted?
Join date: 23 Jul 2007
Posts: 15
|
09-04-2007 11:24
hmmm
/me wonders now...
the thing about the llRezAtRoot.... considering I was testing with my collegues, thus ppl sharing the building group, that shouldnt be a problem (at this time) but thx for the tip! besides, it looks like the script never gets there anyway... because when the bug happens, ppl will be never "unsat"...
well i have never sold any furniture so far, and as we are setting up a selling business i just noticed: all my furniture bugs the same way o.O theanimations wont work.
i own the animations but i dont have all permnission on them (like mod) cuz i bought them. would "that" be "it" ?
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
09-04-2007 11:32
And you don't see the "oops" text?
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Naryu Yue
Interrupted?
Join date: 23 Jul 2007
Posts: 15
|
09-04-2007 11:36
nope. actually i have never seen it say oops >_> dont ask :x im clueless now :x
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
09-04-2007 12:08
Well, scary news: Works fine for my alt when I give him a copy. (I commented out all the Rez'n stuff, but the anim works, llSleep()s, llSay()s, sinks the prim and seated avatar, and then unsits him, as expected). Using a copy/trans/NO-mod anim, script, and prim. So... why doesn't it work for you? *stumped*
|
|
Naryu Yue
Interrupted?
Join date: 23 Jul 2007
Posts: 15
|
09-04-2007 12:18
:x /me goes home to run llDie() on self >_>
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
09-04-2007 13:24
/me still says that llSay is your friend. The more the merrier until you track down the problem.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
09-04-2007 14:05
Are you doing these tests on your own land with run scripts switched off? In which case only things owned by you will work.
|
|
Damet Neumann
Registered User
Join date: 21 Apr 2006
Posts: 140
|
just an idea
09-04-2007 16:14
the person testing doesnt have an ao on by chance just wondering if that is keeping the animation from starting still wouldnt explain anythign else not working tho
|