载入中。。。 'S bLog
 
载入中。。。
 
载入中。。。
载入中。。。
载入中。。。
载入中。。。
载入中。。。
 
填写您的邮件地址,订阅我们的精彩内容:


 
while循环
[ 2007/7/23 17:13:00 | By: 梦翔儿 ]
 

default
{
    state_entry()
    {
        llSetText("While loop\ntouch to start loop",<1,1,1>,1);//say what this does
    }

    touch_start(integer total_number) // when touched
    {
        integer counter = 0;  //set counter to 0
       
        while(counter<=10) //start loop with condition that coubnter is smaller than or equal to 10
        {
            counter = counter+1; //increase counter by1
           
            llSetText((string)counter,<1,1,1>,1); //set text showing the counter
            llSleep(.5);  //slow down the loop by waiting .5 s
               
        }
            llResetScript();    //when done with loops,reset script
    }
}
//when someone clicks on the object it will count to ten,with one second in between

 
 
  • 标签:while second life 
  • 发表评论:
    载入中。。。

     
     
     

    梦翔儿网站 梦飞翔的地方 http://www.dreamflier.net
    中华人民共和国信息产业部TCP/IP系统 备案序号:辽ICP备09000550号

    Powered by Oblog.