Tabletop Simulator

Tabletop Simulator

评价数不足
[Script] Custom Buttons
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
76.739 KB
2023 年 12 月 23 日 上午 8:38
10 月 8 日 下午 1:06
7 项改动说明 ( 查看 )

订阅以下载
[Script] Custom Buttons

在 Ediforce44 的 1 个合集中
Basic Script Components
7 件物品
描述
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 条留言
Adil3tr 2024 年 10 月 25 日 下午 12:04 
Object script version of the link button and the state changing button would be really useful.