3/2/2024 0 Comments Tabletop simulator pokerIf it's a chip, then I can set the value of the container using the same setChipValue function that is called by the chip's onLoad and onSpawn events:įunction onObjectEnterContainer(container, enter_object)Īnd if I'm updating the value of a stack when a chip enters, then I want to update the stack's value when a chip leaves. A chip's name could be "1-Chip" or just "1" if you prefer, but it's tag is "Chip" which is much more useful! Now I can check to see what type of object is entering a container. Since I'm now using one event to deal with multiple things, let me introduce another really useful attribute of all TTS objects: tag. Sure, you can split all of that out into different functions and just have onObjectEnterContainer play traffic cop, but the code would have been cleaner all around if there was an object-level version of this event, e.g. If you are scripting for different container interactions, then they're all going to wind up here. It includes lots of things such as bags, decks, and even stacks of chips. You might recall that I said I wished there were more object-level events. Since this is a global event it provides two parameters, like so: onObjectEnterContainer(container, enter_object). One of the important events for custom chips is onObjectEnterContainer. There are also global events that are interleaved throughout. The object-level events for which I had written script routines. Part 5: Tabletop Simulator: Custom Chips - What's Yours is Mine This is part 6 in a series on how to create custom chips for Tabletop Simulator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |