Need Help With Sit Target Helper Script -- It Stops Working :(
|
Erised Young
Registered User
Join date: 2 Dec 2006
Posts: 23
|
03-24-2007 10:20
Hello, I've made some 2-prim chairs using the Sit Target Helper script. I set the target and it works beautifully. After creating the chairs, I take them into my inventory. When I set them out again, they seem to work fine at first--the sit target is exactly where I placed it and it's using the pose I've chosen. However, I've been noticing that after they've been left out for awhile, I'll go to sit on them and the sit target doesn't appear to be working anymore.  I can sit on the chair, but it's not using my chosen pose and my av doesn't sit in the target spot I chose. Has anyone else had this problem? Does anyone have any ideas as to why it stops working after awhile? I'm not a scripting expert.  I'd like to eventually sell the chairs I've made, to earn some extra in-world cash, but of course I can't sell them if the sit target stops working.  Any advice would be greatly appreciated. Thanks! Erised
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
03-24-2007 11:19
It might help us to know:
1--How many times are you able to sit/stand on a rezzed chair before the sit target stops working? I'm guessing it may be just once?
2--What does your helper script look like? It's a lot easier to pick apart and fix a script if we can see it...
All scripts work on simple logic...there is a reason the sit-target stops working...you just need to figure out exactly what action causes the sit-target to stop working...and then find the location inside the script where that action is processed...
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
Erised Young
Registered User
Join date: 2 Dec 2006
Posts: 23
|
03-25-2007 06:05
From: Kenn Nilsson It might help us to know:
1--How many times are you able to sit/stand on a rezzed chair before the sit target stops working? I'm guessing it may be just once? I'm not exactly sure... I'll test it today in-world, paying better attention to that and I'll get back to you. From: Kenn Nilsson 2--What does your helper script look like? It's a lot easier to pick apart and fix a script if we can see it...
I'm using this script, which I found in the forums here: /15/c7/153278/1.html
|
Little Gray
Registered User
Join date: 16 Oct 2006
Posts: 48
|
03-26-2007 04:48
Your using sit target helper and sit target setter from the forum where you put the helper script into an object, sit on it, postion it to where your sit is correct for the object you are trying to set the sit for, then put the sit target setting script into the object you are setting the sit then you click on the object with the sit target setting and it says setting the sit?
Make sure the default action for the object you are setting is not 'sit' .. it has to be touch grab for the setter to work. You can change it back to sit afterwards.
Remove the sit target setter from the object that you set the sit on. You don't need it in there any more once the sit target has been set in the prim.
It's entirely possible that something is wiping the sit position (which is apparently set in some mysterious place in the prims properties, much like particleeffects are), but, intially double-check your usinging it correctly as described herein.
Its also within the realm of possibilities that your original prims got messed up and you can shift-drag it to make a new copy and sit the position in the new/copy.
Otherwise, do please update us with whatever you learn as I use this sit target helper/setting script in production/commerical settings -- but -- haven't been using it long enough .. or obtained feedback .. that its not working.
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-26-2007 05:08
Sounds like a possible Script Reset is occuring and the sit target is not being reapplied?
|
Erised Young
Registered User
Join date: 2 Dec 2006
Posts: 23
|
03-26-2007 08:58
From: Little Gray Your using sit target helper and sit target setter from the forum where you put the helper script into an object, sit on it, postion it to where your sit is correct for the object you are trying to set the sit for, then put the sit target setting script into the object you are setting the sit then you click on the object with the sit target setting and it says setting the sit? Correct!  And, as I said, it works beautifully. LOVE the script.  From: Little Gray Make sure the default action for the object you are setting is not 'sit' .. it has to be touch grab for the setter to work. You can change it back to sit afterwards.
Remove the sit target setter from the object that you set the sit on. You don't need it in there any more once the sit target has been set in the prim.
Hmm, these two things I did not know about... I *did* leave the setter in the object. I'll remove it and see if it helps. From: Little Gray It's entirely possible that something is wiping the sit position (which is apparently set in some mysterious place in the prims properties, much like particleeffects are), but, intially double-check your usinging it correctly as described herein.
Its also within the realm of possibilities that your original prims got messed up and you can shift-drag it to make a new copy and sit the position in the new/copy.
Otherwise, do please update us with whatever you learn as I use this sit target helper/setting script in production/commerical settings -- but -- haven't been using it long enough .. or obtained feedback .. that its not working.
The chairs I pulled out of my inventory to test yesterday worked fine all day. None of them stopped working, but I'm eager to check them again tonight to make sure they are still working. Will remove the setter tho and see if that helps. Will keep everyone posted. Thanks SO MUCH for the advice... I truly appreciate it! 
|
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
|
03-26-2007 10:02
From: someone It's entirely possible that something is wiping the sit position (which is apparently set in some mysterious place in the prims properties, much like particleeffects are), but, intially double-check your usinging it correctly as described herein. Note that if you don't change the sit target from the default, scripts that handle sitting won't trigger. That is, if an object as the default sit target, sit-handling scripts in that object won't detect the avatar sitting. From: someone Its also within the realm of possibilities that your original prims got messed up and you can shift-drag it to make a new copy and sit the position in the new/copy. Don't use shift-drag-to-copy for an object with a sit target, unless the sit target is coded into the object's script. That is, shift-drag-to-copy loses a LOT of an object's properties (like floating text, sit target, particles, etc.) so only do that on relatively simple objects.
|
Erised Young
Registered User
Join date: 2 Dec 2006
Posts: 23
|
03-26-2007 16:56
OK, I think I figured out what breaks the script, but I don't know why. (I gave a chair to a friend to test, and he actually figured out what breaks the helper/setter.)
When I right-click on the chair and pull up the pie menu, if you don't make a selection but rather click the bag instead (which is easy enough to do simply by changing your mind with the pie menu open and clicking on the open center of the pie menu) we get a script error in the chat window: [16:50] Object: Searching for Sit Target Helper... [16:50] Object: Sit Target Helper not found. No sit target set. Futzing around with it a bit we found that the pie menu doesn't need to be open. If we left click, we get the message, and the sit no longer works correctly.
I also have a three prim design that I'm working with. We tried the same experiment on one of those and had no problem. Now, the only difference between the two is that I removed a "cushion".
So, we took a look at the setting in the edit menu. The two prim design had the default, touch/grab set for when you left clicked, and the three prim model had buy selected. So, we changed the two prim from touch/grab, to sit. And the problem went away.
It seems a reasonable workaround, but if what we've found can help someone to make the script better, we thought we'd pass it along.
Thanks for all the help so far.
|