Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Lua code. See documentation: https://api.tabletopsimulator.com/ --]]
- button_parameters = {}
- button_parameters.click_function = 'buttonClicked'
- button_parameters.function_owner = nil
- button_parameters.label = "Deal"
- button_parameters.position = {0, 2.3, 0}
- button_parameters.rotation = {0, 90, 0}
- button_parameters.width = 1000
- button_parameters.height = 500
- button_parameters.font_size = 500
- --[[ The onLoad event is called after the game save finishes loading. --]]
- function onLoad()
- --[[ print('onLoad!') --]]
- deckParams = {
- type = "Deck",
- rotation = {x=0, y=0, z =180}
- }
- botParams = {
- type = "Figurine_Card_Bot",
- position = {x=5, y=0, z=0}
- }
- timerParams = {
- delay = 5,
- repetitions = 1,
- }
- mydeck = spawnObject(deckParams)
- mybot = spawnObject(botParams)
- mybot.createButton(button_parameters)
- Timer.create(timerParams)
- end
- function buttonClicked()
- print("Dealing!")
- mydeck.dealToAll(13)
- end
- --[[ The onUpdate event is called once per frame. --]]
- function onUpdate()
- --[[ print('onUpdate loop!') --]]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement