How to Trigger Code in Other Objects in Tabletop Simulator

  Рет қаралды 11,066

Ludo Lodge

Ludo Lodge

Күн бұрын

Пікірлер: 29
@kaellok01
@kaellok01 3 жыл бұрын
As someone who has only a rudimentary knowledge of programming, your channel has been wonderful. I've been adding scripting to a TTS mod as a way to learn-by-doing, and this video in particular helped me solve one immediate problem and at least three others that I wasn't even aware of at the time. Like you said in the video, it's something a little simple, but not knowing that you can do something or why you might want to can be a huge blocking point. A future video going a little more in-depth on loops, and how/when to use them, would be great.
@duggie6975
@duggie6975 3 жыл бұрын
These are fantastic. Any chance you could consider doing a tutorial on adding general text fields for notes?
@Diabollus996
@Diabollus996 Жыл бұрын
Hi, please tell me how to prescribe to each card in the deck a different strength from 1 to 5. Several decks of 21 cards
@cardboardjourney4955
@cardboardjourney4955 Жыл бұрын
Would this work using one button to call another. Im using a memory bag to place a Deck Building Table for a TCG mod i built. I want to hide the bag and make my own buttons to instead do the place and retract functions built into the Memory Bag.
@RusticWhisperer
@RusticWhisperer 3 жыл бұрын
After each video you post, I wonder 'how do you not have more of a following?' Your videos are focused, easy to follow, and most importantly: useful! I've watched most of them multiple times. Keep it up! Also a question: how might I track a 'round' so as to call a function at the beginning of each new one? (round in this case being all players have taken their turns and are ready for another cycle.)
@erikmisiego2676
@erikmisiego2676 2 жыл бұрын
Hi, incredible videos! just one question, I have a selfmade boardgame and I want to make a presentation video using the TTS. Can you tell me if its possible and how can I do it? thank you in advance
@jayare7750
@jayare7750 Жыл бұрын
I'm looking into making a variation of continental rummy, turned based and round based in Tabletop Simulator. Will you ever make a series on creating a full game in TTS? Preferably Continental Rummy🤣... Kidding on the last part, but I would be interested in seeing the mechanics on how to end and start a new round and score keeping
@14cassara
@14cassara Жыл бұрын
Hi! I'm hoping you still look at comments from time to time. I'm struggling with setting up a function to lock some of the items on my table, and a separate one which unlocks them. The kicker is that I need to perform this function on objects that are leaving an infinite bag, so I don't know their GUID's. I feel like this is a Scripting Zone job but I've only started LUA about a week or so ago and haven't done any of that yet.
@Alex-tn7pv
@Alex-tn7pv 3 жыл бұрын
I'm struggling with custom asset bundles. I'm trying to trigger an animation without having to right click on the game object to access the context menu and manually click on the trigger numbers, but I'm in way over my head with the scripting. I'm trying to trigger my animations like TTS' RPG Kit miniatures.
@BishNufc
@BishNufc 3 жыл бұрын
Great stuff as usual.
@JonathanBarouch
@JonathanBarouch 3 жыл бұрын
Is it possible to declare/change the value of another object's variable? For example, if the Global object has a variable "round" that starts the game equal to 1, could a button on a black checker set that value to 2 in a way that persists on the Global object? I feel like there must be a way!
@JonathanBarouch
@JonathanBarouch 3 жыл бұрын
I figured it out! If anyone else is wondering, use the function setVar(). It works exactly like getVar() as Ryan used it in the card drafting video, except that after the variable name you add a comma and then the new value before closing the parenthesis. So in the round count example, the function on the checker might look like function myFunction() Global.setVar("round", 2) end or perhaps more usefully, function myFunction() Global.setVar("round", Global.getVar("round") + 1) end
@Qurosia
@Qurosia 3 жыл бұрын
Hi Ludo Lounge! I've been trying desperately to find out how to script a script zone deck shuffle - as a new deck formed via previous scripting to add decks together. I want to be able to get whatever is in a zone to shuffle, and I have scoured the web for ideas and came up empty. Hopefully you (or others) can offer some advice.
@Ediforce44
@Ediforce44 2 жыл бұрын
I wonder is there a list with all command like "onLoad() onClick()" etc. I searched the web but I can't find a website which lists them.
@LudoLodge
@LudoLodge 2 жыл бұрын
I think this is what you're looking for: api.tabletopsimulator.com/events/. 🙂
@Maksim-ty8ki
@Maksim-ty8ki 3 жыл бұрын
Have you made a video where with one click of a button you can move objects into a bag and back to the table in such a position in which they were laid out?
@urdaanglospey6666
@urdaanglospey6666 3 жыл бұрын
Where can I get help with a me-specific problem? I don't think many (if any) other people are trying to do what I'm trying to do. Maybe? So, it may not warrant a video.
@theepsilonchurch4330
@theepsilonchurch4330 3 жыл бұрын
is there any way to flip an object with a button? if so how (i cant figure it out, i also have a bunch more questions but dont want to make this a huge comment) Great videos btw they all have been helpful
@-_Nuke_-
@-_Nuke_- 8 ай бұрын
What Im trying to do is, have a bunch of marbles, select them and I want the game to be able to count how many marbles there are and show it on the screen... How do I do it?
@Denzarki
@Denzarki 5 ай бұрын
Watch the 5th video in this series about scripting zones.. you could tell it to get objects in a scripting zone and then i assume you would put # in front of it to get the number of objects in that zone.. if you wanted it to be specifically marbles then you would have to do a loop that loops through the objects in the scripting zone and +1 to a count if its description marble or something like that
@HakanoHD
@HakanoHD 3 жыл бұрын
I'm trying to create a code on tabletop where i could, with a press of a button (which i would create inside tabletop) take an array of SPECIFIC cards from a deck, cards which i would specify their GUID inside a LUA table, but so far i could only make a code that takes a single specific card from the deck (since i put their GUID directly on the takeObject parameters), does anyone knows a code that takes the GUID from a table and put it in the takeObject parameters?
@LudoLodge
@LudoLodge 3 жыл бұрын
You will likely want to loop over your table, and call takeObject for each GUID. So something like: CARD_GUIDS = { "7ff48a", "e4ede2", "a42138" } for _, card_guid in ipairs(CARD_GUIDS) do takeObject({guid: card_guid}) end And the takeObject parameter table would likely include more than just the guid. Hope that helps, I also talk about looping over a table of GUIDs in my card refill video: kzbin.info/www/bejne/nYi1lGhuhrOSntE
@HakanoHD
@HakanoHD 3 жыл бұрын
@@LudoLodge Thank you so much for the reply, i realized that i had a problem in making FOR loops. I just started to learn coding and it took me way to long than it should to make this simple code. But with some help and your videos I came up with this: ****It takes the cards i specified on GLOBAL and it puts them inside a bag**** DECK_GUID = Global.getVar('DECK_GUID') BAG_GUID = Global.getVar('BAG_GUID') CONJ_CARDS = Global.getTable('CONJ_CARDS') function puxarCarta() --- Puxar Carta means Pull a Card in Portuguese --- local Bag = getObjectFromGUID(BAG_GUID) local BagPos = Bag.getPosition() local BagX = BagPos[1] local BagY = BagPos[2] + 3 local BagZ = BagPos[3] local deck = getObjectFromGUID(DECK_GUID) local size = #CONJ_CARDS for i = 1, size do deck.takeObject({flip = true, position = {BagX, BagY, BagZ}, guid = CONJ_CARDS[i]}) end end Thank you very much ^^
@gospelwill
@gospelwill 2 жыл бұрын
Would you be interested in making a video for UI scripting in TTS? Particularly scoreboards and other interaction panels
@LudoLodge
@LudoLodge 2 жыл бұрын
Hey, I likely won't be making a TTS UI Scripting video anytime soon, but maybe my earlier video on custom counter tokens will help: kzbin.info/www/bejne/aaamhWOwgJqZmZo. I also followed it up with a video where I talk through the code.
@FelloniusWizard
@FelloniusWizard Жыл бұрын
Good work. BUT You're using cards all the time. Can I use the same methods in a pile of tiles or tokens?
@FelloniusWizard
@FelloniusWizard Жыл бұрын
NVM, the answer is yes.
@stixx925
@stixx925 Жыл бұрын
Would you be interested in doing a Video Tutorial On making custom status sheets? I cannot find a single video tutorial on the subject! Let me Give you a couple examples of what I mean a Yahtzee score card or more specifically a Role playing game character sheet that you can fill out. I'm trying to Build a Mod to play certain table top role playing games. I can do gfx 2d/3d i just need the scripting involved to take pdf character sheets and be able to fill them out in TTS.
@davidvandrunen3516
@davidvandrunen3516 Жыл бұрын
Was following along and couldn't figure out why it wasn't working, your head covered up the end of the brackets after "deckPos[3]"... working: local deck = getObjectFromGUID("cc1787") function onLoad() DealPlayerCount() end function DealPlayerCount() local deckPos = self.getPosition() for i = 1, 5 do self.takeObject({flip=true, position={deckPos[1] + (3 * i), deckPos[2], deckPos[3]}}) end end
Scripting with Empty Decks in Tabletop Simulator
20:44
Ludo Lodge
Рет қаралды 11 М.
How to Use Atom Text Editor with Tabletop Simulator
15:15
Ludo Lodge
Рет қаралды 6 М.
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
How to Use Snap Points in Tabletop Simulator
12:48
Ludo Lodge
Рет қаралды 32 М.
How to Make Cards in Component Studio 2 | First Impressions!
53:46
How Do Game Devs NOT Overscope??
9:04
Green Light Dev
Рет қаралды 10 М.
How to Play Gloomhaven on Tabletop Simulator (TTS Enhanced)
49:08
Hidden Information in Tabletop Simulator
17:59
Ludo Lodge
Рет қаралды 21 М.
How to Make Tiles in nanDECK
30:37
Ludo Lodge
Рет қаралды 3,9 М.
Scripting Card Auto-Refill in Tabletop Simulator
29:14
Ludo Lodge
Рет қаралды 19 М.