Condo I/O Guides Thread

This thread is exclusively to post Condo I/O related stuff and to help people that is struggling with it.

CONDO TIMER

Items required

  • 1 Clock
  • 3 Counter Modules

First, set up a module that keeps track of the seconds and give them the following properties.
imagen

Second, set up another module that keeps track of the minutes and give them the same properties as the seconds module.
imagen

and last, set up a module to keep track of the hours and give them the following properties.
imagen
(You don’t have to set the max value that high, this is just how I have set on my condo haha)

To make things easier, colour up the modules to make them easy to search.

Now for the connections, in the seconds module do the following:

Repeat the same operation for the minutes module:

Leave the hours module as is. (Unless you want to keep track of days)

Now let’s move to the clock:

Connect up the clock with the seconds module in the OnSecondPassed event.

If you followed these steps correctly, the timer should look like the one shown in the very first image of this post.

Once you’re done with this, decorate it in your own way.

NOTES:
Timer will begin as soon the condo finishes loading all items (workshop items excluded).

8 Likes

Button Anti-Spam / Basic Counter AND Gates

Can be used if you want a button to trigger something only when it’s allowed to (for example, if you’re making a game, and you don’t want things to get triggered during the game logic loop). Of course, this can be adapted to work with non-button inputs.

Items required

  • 1 Button (or other input method)
  • 1 Toggle Module
  • 1 Counter - Counter Min 0, Counter Max 2
  • Condo I/O logic you want to have fire before the button can activate again
    (In this case, we’ll be having a basketball respawn on button press, but only when it’s inside the bucket)

Note: as both toggle and counter module states currently do not save (even with persistent save on), you’ll likely have to set up a fire once trigger volume at spawn to turn on the toggles on load.

Wiring:

  • Connect Trigger ModuleCounter Module.
    Trigger Module On: 0.0 Delay - Add 1 to the Counter Module
    Trigger Module Off: 0.0 Delay - Subtract 1 from the Counter Module

Test the trigger module with a throwaway Condo I/O event. When the trigger is on, the counter should be set to 1, and when the trigger is off, the counter should be set to 0.

  • Connect ButtonCounter Module
    Button OnPressed:
    - 0.0 Delay - Add 1 to the Counter Module
    - 0.001 Delay - Subtract 1 from the Counter Module

When the button is pressed, the counter should increase by 1 almost imperceptibly briefly before returning to its original value.

  • Connect Counter ModuleCondo I/O Logic start, Toggle Module
    Counter Module OnReachedMax:
    - 0.0 Delay - SetOff the Trigger Module
    - Trigger desired Condo I/O logic. In this case, this is respawning the basketball.

When the button is pressed while the toggle is enabled, your Condo I/O event should fire (basketball respawns), and the toggle should turn off. Pressing the button afterwards should do nothing.

  • Connect Condo I/O Logic endToggle Module
    - SetOn the Trigger Module

In this case, the trigger volume in the bucket turns on the toggle module when the basketball is inside. (If you want to execute this example in practice, it should also turn off the toggle module when the basketball is removed.)

If the Toggle Module isn’t currently on, turn it on by triggering your Condo I/O logic or through a throwaway Condo I/O event.

With this, your anti-spam button should be complete. Players should be able to press the button as fast as physically possible without breaking your system.


Other use cases:

The basic counter + trigger module combination can be easily modified and attached to further Condo I/O modules to mitigate button spam in other use cases.
For example, this circuit has a button turn a lamp on and off, but if the button is pressed too many times in a short period, button inputs no longer work until a cooldown period passes.

The counter module in the toggle-counter pair has been modified to no longer disable the toggle module when the OnReachedMax event occurs, allowing the button to turn the light on and off as long as the toggle remains on.

This circuit also adds an additional counter (PressCounter, max 5) and a Timer Module (set to 1 second).
On a button press, the button adds 1 to the PressCounter, and then subtracts 1 from it after a 0.5 second delay. This causes repeated button presses that occur too quickly to fire the PressCounter’s OnReachedMax event.
When the PressCounter OnReachedMax event fires, it turns off the Toggle Module, and starts the Timer. As the Toggle Module is now disabled, further button presses will have no effect.
When the timer fires its OnTimerComplete event, it turns on the Toggle Module. This re-enables button inputs after the cooldown period.

4 Likes

DISCOUNT SUPER HOOPERS

This tutorial here will show you how to make your own variant of Super Hoopers on your own condo.

First you need a structure like the one in the following photo:

Condo I/O stuff needed:
1 Basic Shape Button
2 Counter Modules
1 Timer Module

Items needed:
1 Basketball Hoop

Now let’s get to the whole thing:

1.- Set up a basketball hoop and a counter which we will call it Basket Score Module", connect the basketball hoop with the score counter like this:

2.- Now set up a counter and call it “Basket Game Module”, then set up a Timer Module and connect the Timer Module with the “Basket Game Module” like so:
imagen

3.- In the Basket Game Module, set these conditions:

4.- Now set up a Basic Shape Button and set the following connections on it:

5.- Make sure to set up a blocking volume so no one can access the interior of the game:
imagen

CONGRATULATIONS
You can now play Super Hoopers or Condo Hoopers in your own Condo, press the play button and try to score high C:

2 Likes

Random Teleporters

Here’s a quick, easy method I found to make a teleporter with random destinations for condos. It’s actually so easy that 1) A donkey could do it, and 2) There is no way something similar hasn’t already been done by somebody else, but I will take full credit anyway.


Steps:

  1. Place a stack of teleporters where you want the player to be teleported.
  2. Have an item automatically deactivate all of the teleporters.
  3. Have any item trigger a Random module when the player is standing in the teleporters or activates something.
  4. Give the random module the same amount of events as there are volumes. For each event, have it activate one of the teleporters, then deactivate it after a short delay.
  5. Now you have a random teleporter. woo

Video Demonstration

3 Likes

Psuedo Logic Gates with Counter Modules

Actual logic gates are currently unimplemented, so here are logic gates you can do right now.

Basic Template

All basic logic gates detailed below use a single counter module, two toggle modules for input, and a single toggle module for output.

To setup a pseudo logic gate, the two input toggle modules should add 1 to the counter module when on, and subtract 1 from the counter module when off.


The counter module should then set the output toggle module on or off depending on the conditions provided. Below is an example output. The counter module’s max inputs should be 2 (or more, you can add more inputs).




image

And the final product should look something like this:
(the two buttons are for toggling the input toggle modules, any input would work)

image

AND, OR, and XOR can all be implemented using this basic template.

AND Gate

The AND gate will only be true if both inputs are true.

OnReachedMax: SetOn
OnReachedMin: SetOff
OnChanged: SetOff

OR Gate

The OR gate will only be true if either inputs are true.

OnReachedMax: SetOn
OnReachedMin: SetOff
OnChanged: SetOn

XOR Gate

The XOR gate will only be true if only one input is true.

OnReachedMax: SetOff
OnReachedMin: SetOff
OnChanged: SetOn

NOT Gate

This gate will reverse its input. However, this gate is only a single toggle module. Simply connect another toggle module to the output toggle module and set the new toggle module off when the output toggle module is on and vice-versa.

The image below is a XOR gate with a NOT gate attached.

Practical Applications

So… What can you actually do with this?

Lever Lock

You can have a true output when a “code” with levers is input.

Below is a representation of the circuit made in logic.ly.


1-Bit Full Adder

Adds 2 bits together with a carry-in bit that outputs the sum and carry-out. This isn’t exactly practical but it’s something easy to make with logic gates.


image

Conclusion

That’s how you do pseudo logic gates for now. Note that chaining multiple logic gates together might result in unexpected behavior. Now go make a computer.

4 Likes


Tic Tac Toe

Button Functions

Multiply corresponding red and blue by 2

Turn Functions

on
set red 1 and blue 0
off
set red 0 and blue 1

Red Functions

max 2
set corresponding green 1

Blue Functions

max 2
set corresponding green -1

Green functions

max 1
color corresponding button red and deactivate
add to connected win counters
0.1s reset green
0.1s toggle turn
0.1s add to win 0
min -1
color corresponding button blue and deactivate
subtract to connected win counters
0.1s reset green
0.1s toggle turn
0.1s add to win 0

Greens connections to White Win counters
[1 4 7][2 7][3 7 8]
[1 6][2 4 6 8][3 6]
[1 5 8][2 5][3 4 5]

White 0 functions

max 9
fire tie relay

White 1-8 functions

max 3
fire red win relay
reset win 0
min -3
fire blue win relay
reset win 0

blue win, red win, and tie relay functions

fires button lock relay

reset functions

set buttons to white and activate
set toggle to on
set red to 1 and blue to 0
reset white win counters to 0

Timer functions

start on spawn
on complete fire full reset

EDIT
new compact version

3 Likes

Simple Selector

A simple selector will let you use buttons to go forwards or backwards through a line of modules. Reset button available to go to your desired default option. Looping between first and last is optional.

Blue Relays

[Any Action you want to fire connects here]
0.1s delay, set the current Green Counter below the current Blue Relay to 1

Green Counters

OnMaximum 2
reset itself
fire next Blue Relay
OnMinimum -2
reset itself
fire previous Blue Relay

White Counter

OnMaximum 2
reset itself
Multiply by 2 all Green Counters
OnMinimum -2
reset itself
Multiply by -2 all Green Counters

White Relay

Resets all Green Counters and fires a Blue Relay of your choice as the default selection.

Timer

Simple Timer that Starts On Spawn and OnTimerComplete fires White Relay

Buttons

Left Button sets -2 to White Counter
Middle Button fires White Relay
Right Button sets 2 to White Counter

Disable Looping

the first Green Counter on minimum only set itself to 1
the last Green Counter on maximum only set itself to 1

2 Likes

Advanced Selector

An advanced selector will let you use buttons to go forwards or backwards through a line of modules, firing actions upon selection. With ability to repeatedly fire the same action from selection, and repeatedly fire a separate action that is not fired upon selection. Reset button available to go to your desired default option. Looping between first and last is optional.

Blue Counters

OnMaximum 2
[Any action you want to fire upon selection connects here]
set 1 to itself
0.1s delay, set the current Green Counter below the current Blue Counter to 1
OnMinimum -2
[Any action you want to fire upon after selection connects here]
set 1 to itself

Green Counters

OnMaximum 2
reset itself
reset current Blue Counter above it
set 2 to next Blue Counter
OnMinimum -2
reset itself
reset current Blue Counter above it
set 2 to previous Blue Counter

White Counter

OnMaximum 2
reset itself
Multiply by 2 all Green Counters
OnMinimum -2
reset itself
Multiply by -2 all Green Counters

Red Counter

OnMaximum 2
reset itself
Multiply by 2 all Blue Counters
OnMinimum -2
reset itself
Multiply by -2 all Blue Counters

White Relay

Resets all Green and Blue Counters, and 0.1s delay set 2 to Blue Counter of your choice as the default selection.

Timer

Simple Timer that Starts On Spawn and OnTimerComplete fires White Relay

Buttons

Upper Left Button sets -2 to White Counter
Upper Middle Button fires White Relay
Upper Right Button sets 2 to White Counter
Lower Left Button sets -2 to Red Counter
Lower Right Button sets 2 to Red Counter

Disable Looping

the first Green Counter on minimum only set itself to 1
the last Green Counter on maximum only set itself to 1

2 Likes

Random Fire Once

A Random Fire Once will make a Random Module fire a desired result once, when the random fires the same result, instead the Random Module will be fired again until an unused result has been fired.

White Counter

OnMaximum 2
set 1 to itself
0.000001s fire Random
OnMinimum -2
set 1 to itself
set 1 to all Green Counters
reset Red Counter
[Add more resets here if needed]

Random

multiply 2 to random Green Counter

Green Counters

OnMaximum 2
set -1 to itself
add 1 to Red Counter
[Add desired actions here]
OnMinimum -2
set -1 to itself
multiply 2 to White Counter

Red Counter

OnMaximum [equal to or less than total Green Counters]
set White counter -1

Timer

Simple Start On Spawn Timer that set -2 to White Counter

Buttons

Upper Button multiply 2 to White Counter
(Optional) Lower Button set -2 to White Counter

3 Likes

Compact Chain

A Compact Chain lets you go forward through Counters, firing each counter two separate times.

White Counter

OnMaximum 2
reset itself
multiply 2 to all Green Counters
OnMinimum -2
reset itself
set 1 to first Green Counter
reset all other Green Counters
[add further resets here]

Green Counters

OnMaximum 2
[add first actions here]
set -1 to itself
OnMinimum -2
[add second actions here]
0.1s set 1 to next Green Counter

Timer

simple Start On Spawn Timer that set -2 to White Counter

Buttons

Upper Button set 2 to White Counter
Lower Button set -2 to White Counter

3 Likes