of course!!! have a great day as well. Sorry if it was too much, I enjoy this kind of interaction and want to show I’m dedicated to help/fix
Austin
Creator of
Recent community posts
okay I’ve further updated how the oscillator calculates x to guarantee it hits the correct extremes:

it’s possible to further refactor this but I like simplicity because it helps me return to the project and mentally load the code when needed. I’d like to also note that my implementation is an alternative implementation to Barotrauma and may not function exactly. They use a phase value which I call “x” and modulate the value wherein I am “ping-ponging” a value to determine a position in the wave form.
here’s the calculations for each wave form:

I updated the frequency calculation (which I forgot to do after taking screenshots) so that it isn’t at half herz. With that said, after some testing I think it all works now… let me know if you disagree. I’ll publish the new version soon.
I also found some other bugs/issues while testing that will be included.
Here’s what the logic looked like prior to this bug:

I’ve updated the signal processing method to behave as you described:

For frequency, I realized I was modulating by a value of 1, meaning the value of x will always be between 0 and 1.

This worked (mathematically) but where it falls short is accuracy. Time in Unity is not inclusive to every possible moment of real time, making the incrementation (and thus calculation) inaccurate. It stutters and doesn’t increment as you would expect, so I had to change how x is calculated.
^ TLDR: the numbers were getting skipped because Time.time is not accurate.
Pulse has been updated to look like this, using delta time instead of application time:

I tested this with a light component, it can toggle the light on/off with every pulse.
This fixes pulse, I am going to continue on the others, even though I believe they’re working now. But I will continue to test.
If you think you found an issue with the tool, this is the spot to post about it. I can’t guarantee I’ll be able to get to every request but I’ll try my best.
Please check existing posts before posting your own topic/issue.
Please also include screenshots, videos, etc. and excessive detail about what you were doing, how you were doing it, and what the result was.
Poorly worded posts may be ignored.
CS2 has an issue tracker that displays common errors and data type mismatches between signals. Let’s take a look at an example to learn how to read and use the issue tracker.
Below is a working component system. Each component has a tiny green light in its upper right hand corner to mean it’s functioning correctly.

The Adder component typically only works with numerical values. In the screenshot below I’ve changed one of the constant components values to a non-numerical field like a string.

You can see that the green light in the upper right hand corner of the Adder component is now a red light. There’s also an error displayed beneath the component. Additionally, there’s an error that appears in the Issue Tracker window in the top left hand corner of the screen.

Clicking the arrow button on this error will take your camera to the screen position where the error component exists.
From there, you can make corrections as needed. This feature is simply meant for alerting you to when a signal doesn’t appear to be used correctly.
Here you’ll learn how to add two numbers together and display it on a preview node. It will cover the following:
- How to create component nodes
- How to edit components
- How to connect components
- How to display results
Creating Components
- Press space bar or right click in an open area of the component editor
- In the search box, type “Add”
- Select the “Adder”

Editing Components
- Using step 1 above, create a “Const” component instead of an “Adder” component
- Select the “Const” component by left clicking it
- In the top right corner, use the Component Editor to set the component’s memory value to 1

Connecting Components
- Using step 1 and 2 above, create another “Const” component and assign it’s value to 2 (hint: you can copy/paste inside of CS2!)
- Click and drag from each of the Const components’ output nodes to the Adder’s input nodes
Note: The right side of the component nodes is the “output”, the left side is the “input”. You can’t ever connect two input nodes nor two output nodes.

Display Results
- Use the above steps to create a “Preview” component
- Use the above steps to connect the Adder component’s output node to the Preview component’s input node

Getting your work into Barotrauma is as easy as creating a blueprint in CS2 and pasting it as an item assembly in the submarine editor.
Step 1
Either deselect everything or select only the components you’d like to export to Barotrauma. In this example, I have the following components and I’ve selected nothing because I’d like the system to automatically export everything.

Step 2
- Go to Tools -> Export as Item Assembly…
- You can do either “to clipboard” which will let you paste it into Barotrauma, or you can create an XML file. In this case I’ve chosen to clipboard.

Step 3
- Go to the Barotrauma sub editor and hold SHIFT and then right click
- Select “Paste item assembly”

Notes
- This feature was difficult for me to implement and get the way it is. I’m still working on it, but you may notice that sometimes wires don’t move with the components they’re supposedly connected to. To fix this, go into wire editing mode and make sure each wire’s start/end nodes are overlapping with the component they’re meant to be attached to. Moving the circuits around will then include moving the wires around too.
hey there mr. angry pidgeon! This version of component sandbox has issues. I’ve been working on a new iteration of the tool that has WAY more features and improvements. I’ve stopped working on this one to support the other. This one will go into a legacy mode once component sandbox 2 is ready. Sorry about that :)
hey thanks for the awesome comment! I’m currently working on another project double-full time right now. However, I can say that I will be revisiting Component Sandbox this year. Wherein, I may rebuild (and open source) the entire thing. I’ve learned a lot about Unity and I will mention UI has never been my strong suit. I will take that feedback for the next iteration, several others have mentioned to me similar things about the UI. Thanks again.

