Tabletop Simulator

Tabletop Simulator

评价数不足
Item Spawner/Selector
   
奖励
收藏
已收藏
取消收藏
Number of Players: 1, 2, 3, 4
Assets: Scripting
标签: Custom Models, 4+
文件大小
发表于
更新日期
70.910 KB
2019 年 6 月 19 日 上午 6:11
2020 年 4 月 29 日 上午 9:24
13 项改动说明 ( 查看 )

订阅以下载
Item Spawner/Selector

描述
An item spawner/selector script that allows you to select options and spawn/select an item in a bag that matches those options.
4 条留言
BaconCatBug™  [作者] 2023 年 8 月 11 日 下午 8:56 
Feel free to fork and fix this
BaconCatBug™  [作者] 2023 年 8 月 11 日 下午 8:55 
No idea, probably not.
RankMayor 2023 年 8 月 11 日 下午 1:33 
does this still work?
Coping Kobold 2023 年 5 月 4 日 上午 7:29 
I found (and fixed) a bug.

If the spawner is high above the table, the object's actual spawn position gets exponentially higher than the spawner. This is because you're essentially adding the spawner's position twice when spawning the object.

Broken code: spawnedItemPosition=self.positionToWorld({0, positionSelf.y+2, (0-((totalSections+2)*menuZ))+spawnZoneZOffset})

Fixed code: spawnedItemPosition=self.positionToWorld({0, 2, (0-((totalSections+2)*menuZ))+spawnZoneZOffset})