prim stuck as phantom
|
|
Horg Neurocam
Mineralogist
Join date: 28 Sep 2005
Posts: 19
|
04-06-2008 09:34
hallo! i had this nifty wooden crate script in the Cavorite Mines that, when you collided with it, would fall apart as if hit with a crowbar. In the past week, however, none of these scripts work anymore. Turns out the objects are now permanently stuck as phantom, and what's more, i cannot even "un-check" the 'phantom' check-box when editing the prim! here, for your amusement, is the previously working script, that now is stuck in "phantom" forevermore! can anybody tell me what's changed in SL so that this no longer works? (the crate consisted of several 'panels', each of which had this script.. ) default { on_rez(integer x) { llSetStatus(STATUS_PHYSICS,FALSE); llSetStatus(STATUS_PHANTOM,FALSE); } state_entry() { llListen(831,"","",""); llVolumeDetect(TRUE); } collision_start(integer n) { llSay(831,"pop"); llSetStatus(STATUS_PHYSICS,TRUE); llSetStatus(STATUS_PHANTOM,FALSE); llSleep(5); llDie(); } collision_end(integer n) { llSay(831,"pop"); } touch_start(integer total_number) { llSay(0, "Touched."); }
listen(integer channel, string name, key id, string message) { if(llToLower(message) == "pop") { llSetStatus(STATUS_PHYSICS,TRUE); llSetStatus(STATUS_PHANTOM,FALSE); llSleep(5); llDie(); } } }
thanks for your time and help, HN
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
04-06-2008 11:33
This sounded like a fun script to play with.  And it behaved just as you described but...  "When detect = TRUE, this makes the entire link set the script is attached to phantom." "As of SL 1.6.7, llVolumeDetect should not be used on physical objects! Doing so will cause the object to fall through the ground and go off-world." [a fact I can attest to!  ] ...in any event, I just commented out the line: llVolumeDetect(TRUE); and it all worked fine for me. Why do you need llVolumeDetect when the script is in every object? Isn't the point of llVolumeDetect to be used with large (probably invisible), non-physical, phantom objects? I may have missed something but I did have fun stacking up columns of cubes and knocking them over. 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
04-06-2008 11:41
Good point. Really you should be turning off llVolumeDetect() when you turn physics on (if you still want to use volume detection). llVolumeDetect() is independent of the STATUS_PHANTOM flag.
|
|
Horg Neurocam
Mineralogist
Join date: 28 Sep 2005
Posts: 19
|
04-06-2008 12:13
excellent! thank you! i had volumedetect was in there because... because i'm new to scripting and its logic! It was there from a previous script i'd been given.
testing it on new boxes works just perfect now!
one question though: is there any way to "reset" the old crates? they're still "permanently" phantom, and every time i try to uncheck the box, it remains phantom! even removing the script doesn't seem to help...
(not that i can't simply build new crate panels, but now i'm just curious.. )
HN
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
04-06-2008 14:19
From: Horg Neurocam one question though: is there any way to "reset" the old crates? they're still "permanently" phantom, and every time i try to uncheck the box, it remains phantom! even removing the script doesn't seem to help... llVolumeDetect(FALSE) should do the trick.
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
04-06-2008 17:19
At the moment it seems that if you set an object to volume detect while it is already phantom (normal phantom) then the object becomes permanently phantom, even if you disable volume detect again. Too late at night for me to investigate further, my thoughts are it's either that:
- Volume detect isn't turned off properly - Phantom is getting stuck on somehow
Had to replace several prims today that I'm using with water-effects (volume-detect based collisions).
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-06-2008 17:54
From: Haravikk Mistral At the moment it seems that if you set an object to volume detect while it is already phantom (normal phantom) then the object becomes permanently phantom, even if you disable volume detect again. This is not new behaviour and you don't have to have it set phantom first. Once llVoumeDetect is used, the object is permanently phantom: "When enabled llVolumeDetect will remain in effect as long as there is a script on the object. It will be automatically removed when the last script is deleted, however the phantom state will persist."
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
04-06-2008 20:35
You interpret that to mean 'llVolumeDetect(FALSE)' has no effect? I'd interpret it as defining extra events (all scripts removed) that turn volume detect off. One would think the function has a parameter for a reason. I'm sure I have also successfully turned volume detect off before. I'll have to look around and see if I still have any scripts in which I did that, and see how old they are.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-07-2008 03:26
From: Hewee Zetkin You interpret that to mean 'llVolumeDetect(FALSE)' has no effect? I'd interpret it as defining extra events (all scripts removed) that turn volume detect off. One would think the function has a parameter for a reason. I'm sure I have also successfully turned volume detect off before. I'll have to look around and see if I still have any scripts in which I did that, and see how old they are. Read again, I was not commenting on turning llVolumeDetect off.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|