Tabletop Simulator

Tabletop Simulator

Not enough ratings
Scripting Example - BlackJack
Game Type: Scripting
Number of Players: 1, 2, 3, 4, 4+
File Size
0.091 MB
Feb 10, 2016 @ 10:42am
May 9, 2016 @ 12:49pm
13 Change Notes ( view )

Subscribe to download
Scripting Example - BlackJack

A basic game of BlackJack showcasing how the new mod scripting works.

API and Scripting documentation can be found on the Berserk Games website:

All feedback and suggestions regarding scripting and the API are welcome and should be posted on our official forums.

Topics covered in this example:
Default events: onload, onPlayerChangedColor
Spawning custom models
Deleting objects
Taking items from infinite bags
Changing variables of Lua scripts belonging to other objects
Dealing cards
Scripting Zones
Detecting objects in Scripting Zones
Adding 3D UI buttons to objects
Lua Coroutines
< >
[FLC] Mikeware Sep 21, 2016 @ 11:13pm 
The example doesn't seem to properly detect chips in the latest version. Did something change?
Kani Jul 26, 2016 @ 1:17pm 
Thanks for this!

And Fluffy, if it's a scripting example then wouldn't it be good to have the most straightforward and bug-free code possible? Otherwise people inevitably will be learning off something that was flawed to begin with.
Fluffypinkbunny Jul 10, 2016 @ 11:29am 
For all the people who found bugs, Congrats, this is a scripting EXAMPLE. I am using it to learn the scripting without breaking a harder game. Once you find a bug, FIX IT. There now you have a new game that you fixed, and can make your own games.
Mr_Lit Jun 30, 2016 @ 4:43am 
is there a way that i can get the cards to be added for my on the table for each player? I thought i saw that somewhere but not entirely sure! Thanks!
Slamakans Feb 19, 2016 @ 8:27am 
Thank you for this.
Raven_of_Nevaria Feb 18, 2016 @ 12:23pm 
Bug: system will take player's bet as a loss when there is a push/tie. the rule is the bet should be returned to the player when there is a push/tie.
olly! Feb 16, 2016 @ 10:21am 
I would suggest having a "start game" button instead of starting the game automatically. The button is removed after clicking on it and reloading would not break the current game setup. The other way would be to disable onload script on game load.
Dan  [author] Feb 16, 2016 @ 10:02am 
Yes for now. Scripting is still in beta while we work out these things. Thanks for your feedback!
olly! Feb 16, 2016 @ 9:21am 
Will I have to clean up before each save? That sounds kinda bothersome.
-=TPG=- clover Feb 16, 2016 @ 9:16am 
srry guys
i like it but i found already 7 bugs