After using llSetLinkPrimitiveParamsFast everything went well.
This one is very much faster then llSetPrimitiveParams.
Together with llGetPrimitiveParams([PRIM_SIZE, PRIM_TYPE]) and llList2Vector(params,3) I can detect and control the cutting level

I still use the loop.
I'm not a very good programmer, so I keep it this way.
Thanks for the help, Fred


-----Oorspronkelijk bericht----- From: Chris
Sent: Thursday, March 27, 2014 2:31 PM
To: opensim-users@lists.berlios.de
Subject: Re: [Opensim-users] llSetPrimitiveParams doesnt work anymore

Yes I agree, loops with sleeps or functions that incur sleep penalties
will quickly cause the script to appear to "hang up" eventually. Try
llSetLinkPrimitiveParamsFast instead. If you need it to only apply to
the prim that the script is in, use LINK_THIS. If you for some reason
need the delay, try using a timer with llSetLinkPrimitiveParamsFast, and
a count variable, stopping the timer after the count variable has
reached a specific number of steps.

On 3/27/2014 6:55 AM, Melanie wrote:
Don't use loops with functions that incur time penalties. Use timers
instead. Loops will tie up the script threads until no scripts will
run anymore.

Melanie

On 27/03/2014 12:48, Fred Folkerts wrote:
Hello,


I want to make use of a script for opening a door using llSetPrimitiveParams.
After a whyle the script does not react anymore on touching.
This happen for example with the following script:

vector cut = < 0, 0.25 , 0 >;
float step = .015;

default {
     touch_start(integer total_number) {
          do {
              cut.x += step;
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_CYLINDER, PRIM_HOLE_DEFAULT, //hole_shape
                           cut,    // cut
                           0.95,    // hollow
                           < 0.0, 0.0, 0.0 >,    // twist
                           < 1.0, 1.0, 0.0 >,    // top_size
                           < 0.0, 0.0, 0.0 >]);
         }
         while (cut.x > 0 && cut.x <  .75);
         step *= -1;
     }
}
When using a new prim with the same script, it works again!
Using the do-while loop in a function it most times doesnt work at all.
Fred / OSGRID



_______________________________________________
Opensim-users mailing list
Opensim-users@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
Opensim-users@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-users


--
OpenSim: 10 Region Standalone on 0.7.6 Dev
Physics: Open Dynamics Engine
OS: Windows 7 (x64)
CPU: AMD Phenom II X4 840 3.2 GHz
Memory: 11 GB DDR3
Database: MySQL 5.1.63 (x64)

_______________________________________________
Opensim-users mailing list
Opensim-users@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
Opensim-users@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-users

Reply via email to