Jade Tachikawa Posted February 12, 2015 Share Posted February 12, 2015 Hi there, I have a project at the moment to script a boat that is over 100 prims. I am trying to use the trick where you make everything apart from the base, physical shape none. I'm trying to use this code but get an error saying it can't set the object as physical because its greater than 32 prims. If I do it manualy, it works. llSetLinkPrimitiveParams(LINK_ALL_CHILDREN, [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_NONE]);llSetLinkPrimitiveParams(LINK_ROOT, [PRIM_PHYSICS, TRUE]);Is there a way to script this as leaving the shape set to none means you can walk through the boat. J Link to comment Share on other sites More sharing options...
mikka Luik Posted February 12, 2015 Share Posted February 12, 2015 The only thing that springs to mind is that in the past I have found that using LINK_ALL_CHILDREN seemed to hit a 'throttle' so that the prim paras were not applied to the whole set. Not sure if thats the case here but to work around that I used a counter to iterate through the linked prims to set individually (using the *Fast version of set paras to avoid the delay ). Link to comment Share on other sites More sharing options...
Jade Tachikawa Posted February 12, 2015 Author Share Posted February 12, 2015 Hi there, Thanks I'll check to see if thats happening. I've tried using the fast version but got the same results and was thinking that maybe the code was being returned before the object flag had been changed (like it says on the Wiki). What about putting a listening script in each prim? Would that create a lot of lag? J Link to comment Share on other sites More sharing options...
Innula Zenovka Posted February 12, 2015 Share Posted February 12, 2015 I am not completely sure whether you want to set the root prim to PRIM_PHYSICS, TRUE because you want to sail the boat, or if you simply want to set the child prims to PRIM_PHYSICS_SHAPE_NONE so you can walk around your boat, and you've found you can't set the root to PRIM_PHYSICS_SHAPE_NONE. Either way, this certainly works for 100 prims (I've just tested it): default{ state_entry() { integer max = llGetNumberOfPrims()+1; do { llSetLinkPrimitiveParamsFast(max,[PRIM_PHYSICS_SHAPE_TYPE,PRIM_PHYSICS_SHAPE_NONE]); } while(--max>1); llSetLinkPrimitiveParamsFast(1,[PRIM_PHYSICS_SHAPE_TYPE,PRIM_PHYSICS_SHAPE_CONVEX]); llSetLinkPrimitiveParamsFast(1,[PRIM_PHYSICS,TRUE]); //comment out if not needed }} ETA I see there's a caveat buried deep in the notes to llSetLinkPrimitiveParamsFast to the effect that you can't use LINK_ALL_CHILDREN to change PRIM_TYPE for more than 10 prims at once, so it looks like the same applies to PRIM_PHYSICS_SHAPE_TYPE, too. Link to comment Share on other sites More sharing options...
Jade Tachikawa Posted February 15, 2015 Author Share Posted February 15, 2015 Would never have thought of doing it in a loop but sounds exactly what I want to do. Many thanks J Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now