Hi everyone! Welcome to another Tabletop Simulator scripting tutorial. In this video, I'll demonstrate how to use various API events to control what can enter a bag. Additionally, I've added some fun colorchanging effects for when items enter and leave the bag to keep things engaging.
I'll also highlight a cool feature from the Pokemon Splendor mod I created. You'll learn how to keep track of the number of items in a bag and set the bag's color tint to a specific color when it’s empty.
The three main functions we discuss in this video are:
onObjectEnterContainer()
onObjectLeaveContainer()
tryOnObjectEnterContainer()
WORKSHOP LINKS:
Starting workshop mod, use this if you want to follow along:
https://steamcommunity.com/sharedfile...
Completed workshop mod. Check this one out if you want to see how it works.
https://steamcommunity.com/sharedfile...
Thanks for watching, and I hope you find this tutorial helpful! Don't forget to like and subscribe for more scripting tips and tricks.
Consider Subscribing ❤
/ @unebriongaming
Timestamps:
0:00 Demo of finished tutorial
2:41 Tutorial Starts
21:05 Dynamic Contents Counter Update