|
触发中有现成的代码,稍微修改一下就可以用。
- /**Change 3D Shape*/
- Array shapename=["fs3d\\General\\Box.3ds","fs3d\\General\\Cylinder.3ds","fs3d\\General\\Sphere.3ds"];
- Array size=[[0.61,0.61,0.3],[0.7,0.7,0.8],[0.5,0.5,0.5]];
- double theindex = duniform(1,3);
- //Get the size of the item
- double x = size[theindex][1];
- double y = size[theindex][2];
- double z = size[theindex][3];
- //Change 3D Shape
- sets(shape(item),shapename[theindex]);
- setobjectshapeindex(item,theindex);
- //Update the item size
- applyshapefactors(item);
- setsize(item, x, y, z);
- //Set item Type and color
- item.Type=theindex;
- item.color=Color.byNumber(theindex);
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|