Tabletop Simulator

Tabletop Simulator

Betrayal at House on the Hill with Widow's Walk [Scripted]
Sekkuar666 Jan 10, 2017 @ 1:02pm
How did you manage the hidden zones?
Even looking at the script I couldn't really understand.

How do you make a single hidden zone be revealed to more than one color at once?

Sorry it's kind of off topic, but I find this mod's script to be very interesting! So many possibilities and been working so great so far.
< >
Showing 1-3 of 3 comments
GiantDwarf01  [developer] Jan 10, 2017 @ 1:21pm 
Ha well first off sorry if my code is messy and confusing, I'm not very good at writing in a way that others can jump in and read it ha. As to the zones, tabletop doesn't technically allow for zone color changing via code (which they really oughta IMO) but what they do do is giv every object a GUID, even zones. The trick is those zone GUIDs are hidden in the save file, so you gotta dive into those. Once you got those you can set posistion, scale, and rotation. So what I did was make a delegate zone per player color, went into the save file, got their GUIDs, set their scales to 0 on load so they're invisible, then on the startHaunt function, depending on the specified traitor, grab the correct color zone, move it to the spot where the old grey zones are, delete the grey zones, and scale the new zones to the same size. That's why sometimes if you hit the start haunt button multiple times after new cards have been drawn between clicks, there might be a little message about a object not existing (trying to delete the already deleted grey zone) and two color zones exist over the books. But luckily that's pretty rare and people generally know not to mess with buttons in scripted games.

Hopefully that all makes sense ha.

Edit: realized I didn't fully answer the multiple colors per zones on purpose. Basically if it's everyone except one color, it's just an inversed hidden zone, which is just a normal TTS thing, if it's like the double traitor or stuff, it's a weird glitch or function of the zones that works out. If an object is inside a hidden zone, and then another zone is in the same location, it'll display to both colors like it's only their zone - the fog is a little thicker and weirdly colored but you can see everything inside it.
Last edited by GiantDwarf01; Jan 10, 2017 @ 1:48pm
Sekkuar666 Jan 10, 2017 @ 2:58pm 
Originally posted by GiantDwarf01:
if it's like the double traitor or stuff, it's a weird glitch or function of the zones that works out. If an object is inside a hidden zone, and then another zone is in the same location, it'll display to both colors like it's only their zone - the fog is a little thicker and weirdly colored but you can see everything inside it.
Yes, that's precisely the scenario I was trying to understand.

I tried to reproduce it, but can't get it to work. It either shows to one player or the other, not both, even though it is inside both hidden zones at the same time.

Thanks for the fast and thoughtful reply!
GiantDwarf01  [developer] Jan 10, 2017 @ 4:02pm 
Originally posted by Sekkuar666:
Originally posted by GiantDwarf01:
if it's like the double traitor or stuff, it's a weird glitch or function of the zones that works out. If an object is inside a hidden zone, and then another zone is in the same location, it'll display to both colors like it's only their zone - the fog is a little thicker and weirdly colored but you can see everything inside it.
Yes, that's precisely the scenario I was trying to understand.

I tried to reproduce it, but can't get it to work. It either shows to one player or the other, not both, even though it is inside both hidden zones at the same time.

Thanks for the fast and thoughtful reply!

It may have to do with the size and posistion, since the zones I use are all completely equal, neither overwrites the other and they both are shown.
< >
Showing 1-3 of 3 comments
Per page: 1530 50