Isolating scripts
|
|
sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
|
04-20-2007 11:00
I may have missed something so please forgive me if this is obvious.
I was messing around with buiding a sky box and wanted a door for it. To keep it simple i rezzed a flat panel and added :
llSetStatus( STATUS_PHANTOM, TRUE ); llSetAlpha( 0.0 , ALL_SIDES );
as the 'open' part (with the opposite for close). All went well as a standalone unit but when I linked it into the rest of the box and issued the open command the complete unit went phantom - you could stick your arm thru the wall.
Is there any way to isolate a script so it just acts on the prim that contains it?
Thanks
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
04-20-2007 11:22
llSetLinkPrimitiveParams()
_____________________
--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.
|
|
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
|
04-20-2007 11:33
The problem isn't the script, it's that you can't link phantom prims to non-phantom prims. If you do the whole linkset becomes phantom, as you experienced. If you want a phantom door you'll need to keep it unlinked.
|
|
sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
|
scripts
04-20-2007 11:33
Do I have to?
|
|
sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
|
Link
04-20-2007 11:47
Ok if I can't link i'll build it differently. Thanks appreciated
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
04-20-2007 12:03
I have not played with it...but the llSetLinkPrimitiveParams() command should alleviate some of those previous issues, shouldn't it?
_____________________
--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.
|
|
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
|
04-20-2007 12:12
From: Kenn Nilsson I have not played with it...but the llSetLinkPrimitiveParams() command should alleviate some of those previous issues, shouldn't it? I haven't tested it either, but I see no reason why llSetLinkPrimitiveParams should get around the rule that you simply can't have a phantom prim linked to a non-phantom prim; the whole linked object is either phantom or not. All llSetLinkPrimitiveParams does is allow you to not have the script in the prim you're trying to change. edit: if it does in fact work it would be great news for hot tub makers 
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
04-20-2007 12:12
I believe Phantom is an Object property... not a prim property. The wiki lists PRIM_PHANTOM as: "Sets phantom property of an object"
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
04-20-2007 12:24
To OP - What does this phantom and invisible prim for the door actually do? Why not just delete that prim?
_____________________
http://slurl.com/secondlife/Together
|
|
sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
|
scripts
04-20-2007 13:00
Actually i was dreading using llSetPrimitiveParams for the first time but theres an entry on the wiki about it that actually makes sense of the various parameters I hadn't come across before. Time to grit teeth and try it and thanks for the pointer.
|
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
04-21-2007 02:19
From: Escort DeFarge To OP - What does this phantom and invisible prim for the door actually do? Why not just delete that prim? Be...cause it's the door..? Granted, you could have it delete the prim and rez a new prim to close it, but that's unnecessarily extensive for a simple door... As for the door itself, unless it's essential that it goes invisible (Don't know what your door looks like) I would suggest a llSetLocalRot or llSetPos instead, and just have it move out of the way. A sliding or normal swinging door would avoid the problems you're having.
|