[求助]脚本小白求助。。请帮忙解决下,谢谢


Second Life中文指南 http://www.secondlifecn.com/ 第二生命 第二人生_Second Life_ChinaQ_HiPiHi玩家基地 查看完全版 查看精简版
 提醒您:如果本页图片或Flash动画无法正常显示,请点击这里访问原帖。
[求助]脚本小白求助。。请帮忙解决下,谢谢 作者:yangnew 时间:2007-10-13 8:06:52 1

本人不懂编程不懂脚本语言,发现论坛里有好多蛮好的脚本例子了,但是里面//后面的都是解释前面这段东西有什么作用和怎么设置。于是。。。我这电脑白痴就只会复制粘贴。。。请不要鄙视我。。

然后发现一个问题,我看有的SCRIPT里面的那些括号位置是很奇怪的,应该是规定的吧,但是论坛里很多脚本都是写在一起了,我不知道该怎么复制往上粘贴,从而把这些宝贵的分享用上。我老是复制完就出现一大堆红色的错误部分,请问能不能随便找论坛里的某一个贴子里的脚本进行个复制上SL的示范呢?谢谢了。。我相信也有很多脚本小白也和我一样郁闷吧。。。

以下是tony发贴的一个关于火效果的脚本:

integer animOn = TRUE; //Set to FALSE and call initAnim() again to stop the animation.

//Effect parameters: (can be put in list together, to make animation have all of said effects)

//LOOP - loops the animation
//SMOOTH - plays animation smoothly
//REVERSE - plays animation in reverse
//PING_PONG - plays animation in one direction, then cycles in the opposite direction

list effects = [SMOOTH,LOOP];

//Movement parameters (choose one):
//ROTATE - Rotates the texture
//SCALE - Scales the texture
//Set movement to 0 to slide animation in the X direction, without any special movement.

integer movement = 0;

integer face = ALL_SIDES; //Number representing the side to activate the animation on.
integer sideX = 1; //Represents how many horizontal images (frames) are contained in your texture.
integer sideY = 1; //Same as sideX, except represents vertical images (frames).
float start = 0.0; //Frame to start animation on. (0 to start at the first frame of the texture)
float length = 0.0; //Number of frames to animate, set to 0 to animate all frames.
float speed = 10.0; //Frames per second to play.


initAnim() //Call this when you want to change something in the texture animation.
{
    if(animOn)
    {
        integer effectBits;
        integer i;
        for(i = 0; i < llGetListLength(effects); i++)
        {
            effectBits = (effectBits | llList2Integer(effects,i));
        }
        integer params = (effectBits|movement);
        llSetTextureAnim(ANIM_ON|params,face,sideX,sideY,
        start,length,speed);
    }
    else
    {
        llSetTextureAnim(0,face,sideX,sideY,
        start,length,speed);
    }
}


default
{
    state_entry()
    {
        initAnim();
    }
}

所属版面:制造&脚本 本主题第1页
共有回复: 0 共有页数: 1 显示主题数:50     说买网 免费购物 U盘生产厂家