|
Gwylym Loon
Registered User
Join date: 6 Jun 2007
Posts: 81
|
06-09-2008 10:41
I'm having some probs with a collision script. Have an object that watches for a collision. For some people the collision fires off right away. For others it hangs. Any ideas?
collision(integer num_detected) { if(num_detected == 1) { llSetStatus( STATUS_PHYSICS, TRUE); llSleep(5.0); llSetStatus( STATUS_PHYSICS, FALSE); llSay(0,"Setting myself back at: "+(string)myPos); llSetStatus( STATUS_PHANTOM, TRUE); obj_move_to(myPos); llSetRot(myRot); llSetStatus( STATUS_PHANTOM, FALSE); } }
obj_move_to is a function that puts an object back that was knocked down.
|
|
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
|
06-09-2008 11:41
have you tried printing the num_detected to see if its always 1?
and when you say it hangs, what does that mean? a) hangs forever, not useable until you reset it? b) does nothing for that user, but may if they back up and collide again c) does nothing for that user, but might for another user d) pauses, then works but way later than it should e) flips upside down f) chills out g) goes limp, turns flexi
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
06-09-2008 12:52
Incidentally, I don't think you need to set the object to phantom. You are moving it non-physically, and non-physical movement doesn't cause collisions and isn't interfered with by other objects/avatars. Unless you really want it to be phantom for those 0.3 seconds or whatever that the movement and rotation imposes as script delay, there shouldn't be any need.
|
|
Chrominiam Homewood
Registered User
Join date: 13 Jun 2008
Posts: 1
|
06-13-2008 21:18
im working on this with gwylym as well and it is weird because its like lag because it is taking its time to detect the collision avatar touches it 20 seconds to a minute passes then object detects
and the phantom is neccesary for the object to position properly after it is collided with in our setup
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
06-14-2008 08:34
Since it's phantom, do you have llVolumeDetect (TRUE) ? http://www.secondscripter.com/
_____________________
My tutes http://www.youtube.com/johanlaurasia
|
|
Al Supercharge
Registered User
Join date: 22 Dec 2006
Posts: 23
|
Collision stopped working between June 8-12 08
06-15-2008 14:27
See SVC-2532 http://jira.secondlife.com/browse/SVC-2532Script detects my AV walking thru it fine, (colliding with it), both COLLISION_START and _END - but not a physical object moving thru the non-physical object containing the script.
|
|
Gwylym Loon
Registered User
Join date: 6 Jun 2007
Posts: 81
|
06-16-2008 08:34
From: Shadow Subagja have you tried printing the num_detected to see if its always 1?
and when you say it hangs, what does that mean? a) hangs forever, not useable until you reset it? b) does nothing for that user, but may if they back up and collide again c) does nothing for that user, but might for another user d) pauses, then works but way later than it should e) flips upside down f) chills out g) goes limp, turns flexi mainly B. And sometimes C. When I put out one of the objects that detects the collisions it seems to work fine in a number of sims, but if we have multiple of the objects out then we get the weird behavior. I can run into one of the objects and nothing happens. When it does fall it does not move like it normally does. Very frustrating.
|