Tabletop Simulator

Tabletop Simulator

Not enough ratings
Item Spawner/Selector
   
Award
Favorite
Favorited
Unfavorite
Number of Players: 1, 2, 3, 4
Assets: Scripting
File Size
Posted
Updated
70.910 KB
19 Jun, 2019 @ 6:11am
29 Apr, 2020 @ 9:24am
13 Change Notes ( view )

Subscribe to download
Item Spawner/Selector

Description
An item spawner/selector script that allows you to select options and spawn/select an item in a bag that matches those options.
4 Comments
BaconCatBug™  [author] 11 Aug, 2023 @ 8:56pm 
Feel free to fork and fix this
BaconCatBug™  [author] 11 Aug, 2023 @ 8:55pm 
No idea, probably not.
RankMayor 11 Aug, 2023 @ 1:33pm 
does this still work?
Coping Kobold 4 May, 2023 @ 7:29am 
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})