Tabletop Simulator

Tabletop Simulator

评价数不足
countObjectsWithTagInZone
   
奖励
收藏
已收藏
取消收藏
Type: Modding
Assets: Scripting
文件大小
发表于
12.728 KB
2023 年 4 月 25 日 下午 10:13
1 项改动说明 ( 查看 )

订阅以下载
countObjectsWithTagInZone

描述
Custom function example
1 条留言
Habanero 2 月 28 日 上午 1:02 
I stumbled upon this because I'm trying to do this exact thing (tokens go in a zone, counter says how many there are in the zone). When I drag the "test" cube into the zone, it says 0, but when I pull it out, it says 1. Shouldn't it be doing the opposite?

Edit: Ah, I think I get it. When you pick up the token from the zone, it displays the last known amount of matching tag tokens, not the current amount. This script also doesn't seem to display the current amount that are in the zone until you pick up an object from the zone. Janky but it works, thanks.