Jump to content

88 station

  • entries
    131
  • 评论
    3
  • 查看
    659,285

随机生成的光珠代码


moh8888

1,313 查看

随机生成的光珠代码

好久没光顾俺的博客了,原88服因搬家关闭了...

正在安新的宽带慢慢来吧....

方整理MOHAA的一些资料时看到了一个稿子,记得是

俺是回随机代码写的答案已TEST过了,上传吧,供

MOHAA的DRY玩家参考.....

作用是:生成不固化光珠一万个,呵呵,可以装饰地图了...

这是代玛

level waittill spawn //代码放在这以后

level.n = 0

thread addthing local.origin

end



addthing local.origin:

local.ax = randomint 2000 //X轴在2000内随机取数

local.ay = randomint 2000 //Y轴在2000内随机取数

local.az = randomint 1000 //Z轴在1000内随机取数



local.static = spawn script_model

local.static model "static/corona_orange.tik"

local.static.origin = ((1200 -4300 5) + (local.ax local.ay local.az))

local.static.angles = (0 -180 0)

local.static notsolid //不固化

level.n ++ 

if ( level.n < 10000 ) //记数10000

{

wait 1 //等待1秒,再进行下一次循环,是不是太慢...呵呵

thread addthing local.origin

end

}

注:

(1200 -4300 5)的坐标是地图的中点,这里是dm3,每个图的中点要自己设置,不然的话有

可能看不到光珠(X.Y.Z取值范围关系)

最重要的功用是简化地图的代码编写,也许你会用到它!

  • Like 1

0 评论


Recommended Comments

没有要显示的评论。

访客
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 创建新的...