I tried the code bfore for jumpping but I didn't get any thing so instead and during the last week I tried the following code which also doesn't work although
I add llstopAnimation("prejump"); and llstopAnimation("land"); and so on to the last code but all of them don't work. I descovered later that they just animations made by another program which called boser or another applications. and these animation must be attached with the object. moreover, the StartAnimation is just for the owner of the object.
here the last code I tried:
default
{
collision(integer detected)
{
llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation("prejump");
llSetTimerEvent(10.0);//I tried to make the event remains for 10 seconds
//llSleep(3);//I cancelled this one becuase it doesn't make the animation
//work continously
llStopAnimation("prejump");
llStartAnimation("jump");
llSetTimerEvent(10.0);
// llSleep(3);
llStopAnimation("jump");
llStartAnimation("fly");
llSetTimerEvent(10.0);
//llSleep(3);
llStopAnimation("fly");
llStartAnimation("land");
llSetTimerEvent(10.0);//I tried to make the event remains for 10 seconds
// llSleep(3);
llStopAnimation("land");
//llStartAnimation("jump");
//llStartAnimation("fly");
llOwnerSay("animation will end in 10 seconds");
//llSetTimerEvent(10.0);
//llStopAnimation("jump");
}
}
}
feel free to take my code and improve it.
==================================================================================
another code I tried is the following:
default
{
attach(key avatar)
{
vector force = <0,0, llGetMass() * 6.2>;
llSetForce(force, TRUE);
if(avatar==NULL_KEY)
{
llSetForce(<0,0,0>,TRUE);//the force is used with physical prims
}
}
}
====================================================================================
Wednesday, 12 March 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment