Tabletop Simulator

Tabletop Simulator

Not enough ratings
[Script] Custom Buttons
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
76.739 KB
23 Dec, 2023 @ 8:38am
8 Oct @ 1:06pm
7 Change Notes ( view )

Subscribe to download
[Script] Custom Buttons

In 1 collection by Ediforce44
Basic Script Components
7 items
Description
Module for custom buttons
This script is not very complex. It should be a centralised script to manage all your custom buttons and will also be used in some other projects and tools of mine.
It should make it easy to add new buttons and manage all your custom buttons from one script (this one).

You can use this script to use custom models as buttons in your game. There is a click animation and you can block and unblock your buttons.



Contents
You can find two checker pieces (black, red) and an example model for a custom button.
There are also three custom buttons which contain example scripts how to use the custom button module.
  • BLACK: This script contains all the logic you need for this mod to work.
  • RED: This script contains example uses of the custom button module



How to implement this script into your project!
  1. Save the black checker and import it into your project.
  2. Attach you custom buttons to this script (cb_attach()) or let this script create them for you (cb_spawnButton()).



Custom Button API
  • cb_attach(...)
  • cb_spawnButton(...)
  • cb_triggerAnimation(...)
  • cb_tempBlockButton(...)
  • cb_blockButton(...)
  • cb_unblockButton(...)



So that's it. I hope you like it. Feel free to do what every you want with this scripts.
Please, give me some credits if you use it :D

Other Projects
1 Comments
Adil3tr 25 Oct, 2024 @ 12:04pm 
Object script version of the link button and the state changing button would be really useful.