Skip to main content

Search

How do you convert various values to a simple 0/1 value?

  • totodiel

    Most outputs of the controller sensor (button) sends a signal which is false/true (0/1).
    For The L2/R2 and the sticks, you should use a greater than (in the calculator)
    So, connect the signal from the output of the stick or L2/R2 to a calculator logic set on greater than, put it in A and have B as 0.
    If A is then bigger than 0, you get a true signal.

    Or check A to a number of your choice (B), this should get you on the right path.

  • Puntolory

    I thought about using the calculator but didn't have any luck with my attempts earlier, I'll try again but this time I'll follow your suggestions about how to set it up and see if it works properly.

    Thanks for the input!

  • totodiel

    Also, a button press in controller sensor only sends true when you hold it down!
    I made a logic piece that is a true toggle for this, look up my psn and you'll find it under "True Logic" or something like it!

  • RenStrike

    '- Throw in a Calculator and set it to “Equal”.
    - Connect a wire from the joystick/trigger of your choice to the A input.
    - Keep the B value at 0.
    - Connect the Result of the Calculator to a Not Gate.

    Now the signal out of the Not Gate will be ON if the joystick/trigger detects any input. This is because the Calculator checks if the input is equal to zero (not active), and if so, sends an ON signal which the Not Gate inverts to an OFF one. Now if input is detected the Not Gate outputs an On signal.

Please sign in to leave a comment.