scripting, objects behave strange?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

scripting, objects behave strange?

hzhenk
This post has NOT been accepted by the mailing list yet.
I am new to opensim, using version 8.01. Trying to do some scripting. I made a short video explaining my questions. https://vimeo.com/105566109

So I have two questions:
- The llSetTextureAnim is not working properly, what can I improve?
- Why is the surface water object not getting below this Z of 21.58 m. I tried this script with different objects, but every-time it is the same problem.

Script I used for the surface water:
default {
        state_entry(){
                llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, 3, 1, 1, 1.0, 1.0, 0.02);
                llListen(100,"",NULL_KEY, "");
        }
        listen(integer channel, string name, key id, string message)
        {
                vector pos = llGetPos();
                float Z = llList2Float([message],0);
                if (Z==0 | Z>25 | Z<15) {
                        llOwnerSay("wrong Z "+(string)message);
                        pos.z = 22;
                }else {
                                pos.z = Z;
                }
                llSay(0, (string)pos);
                llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_POSITION,pos]);
                llSay(0, (string)llGetPos());
        }
}
Henk Massink
Lecturer Civil Engineering at Hz University of Applied Sciences
Vlissingen, Netherlands