Logic Gadgets: Switch

 

Icon
Name of gadget Switch
Section Sensors & Input
Number of Tweak pages 1
Author LadylexUK, QuietlyWrong
Last updated 21 Feb 2019 [Beta]

Description

This gadget is primarily used to switch things on and off in edit mode without having to go back into the menus (note that the switch is not available nor visible to players when Dream Surfing). You can define what the values of on and off are so you might use it as a very simple selector that toggles between two values. It is particularly useful for debugging purposes during game development where you can turn gadgets on and off that you do or do not need (for example pitch darkness or infinite lives) when you want to test something.

Example Tutorial (from Media Molecule)

  1. Stamp a cube.
  2. Stamp a switch.
  3. Tweak the cube, go to physical properties and connect the on/off output of the switch to the visible input on the cube.
  4. Now if you use the switch the cube will appear and disappear.

Tweak Menus

  1. Switch Colour
    1a Colour input
    1b Colour output
  2. On/Off
    2a. Input
    2b. Output
  3. Off Value
    3a. Input
    3b. Output
  4. On Value
    4a. Input
    4b. Output
  5. Switch Visible In Scene
    5a. Input
    5b. Output
  6. Power
  1. Switch Colour
    You can change the colour of the switch here. The input can dynamically change the colour, while the output will send a signal that can be used to colour other objects the same as the switch.
  2. On/Off
    This determines the state of the switch, whether it is initially on or off. The input can be used to toggle the state of the switch for debugging purposes. The output sends the “On Value” or the “Off Value” depending on the current state.
  3. Off Value
    Here you can define the switch’s “On/Off” output when it is toggled to the off position.
  4. On Value
    Here you can define the switch’s “On/Off” output when it is toggled to the on position.
  5. Visibility
    This toggle determines whether the switch is visible to you while shaping your scene. Switches that are in microchips, currently selected or have tweak menus open will remain visible, otherwise to see a switch with this setting off it is necessary to set your “Show/Hide” settings to include “Preview Invisibility”.
    If the switch is visible, you can toggle it on and off just by clicking on it, no need to go into the tweak menus.
  6. Power
    This turns the whole gadget (not the switch!) on or off (while off, there will be no outputs at all).

Lex Tips

Useful Tutorials

Comments and Feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: