Logic

From Wubbypedia
Revision as of 14:15, 9 April 2024 by RickGotTaken (talk | contribs) (Added stuff from [https://wiki.wubbygame.com/en/Logic](<https://web.archive.org/web/20240205171403mp_/https://wiki.wubbygame.com/en/Logic>).)
Logic (WIP, HIRING)

This page is a work-in-progress and may contain user notes.
You can help by finishing it.

Warning

This page explains advanced features, some players may not understand everything in this page.

Wubby Logic is the second-most important thing in your Wubby worlds, They can do mostly anything such as:

  • Changing block colors
  • Moving blocks / platforms
  • Custom NPC movement

Here are some useful links for wiring:
Easings.net | Contains most easing types with directions.

Input

Notice!

Using a parallel wiring block helps reduce the chances of these blocks not firing correctly.

Input parts are blocks that cannot be connected to in wiring, only connect to. The Input tab is clearly separated from the Special tab, as the line between them is thicker.

These are blocks that are used to power wiring systems. They do not receive wiring inputs, and can only output.


Emits a signal when touched by an unanchored block or gear debris.
Output: The part that touched it.
Configurations:

  • Activation Time: How long it activates for. Default is 1
  • Anchor Type: Decides what blocks get detected. Default is NonAnchored
  • Color To Filter: When filter color is true, only blocks with this color will trigger it. Default is pearl.
  • Filter Color: Whether if this block will only trigger when a block with the specified color touches it. Default is false.
  • Use Activation Time: If set to true, the block will stop outputting when (Activation Time) passed, if set to false, it will stop outputting when the block stops touching it. Default is true.

Emits a signal when clicked on.
Output: The player that clicked it.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Max Distance: How far you can click this block. Default is 32.
  • Toggleable: Whether if this block acts like a switch. Default is true.
Notice!

This block is Admin+.


Emits a signal everytime the server calculates a physics frame.
Output: the deltaTime between the frames.

Notice!

deltaTime is the time (in milliseconds) the server took calculating a physics frame.


Emits a signal when a humanoid changes to the specified state.
Output: The player's username.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • State: The block fires when a humanoid enters this state. Default is Landed.
  • Use Activation Time: If this is off, then the block will only stop firing once the humanoid exits the state. Default is true.

Emits a signal when a player presses the selected key or mobile button.
Output: The player's username.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Input Detection Type: Determines if the block will fire if the input ended, or started.
  • Use Activation Time: When this is off, the block will only stop firing once the player releases the key. This can only be turned off if the "Input Detection Type" is set to "InputStarted", otherwise this setting will be forced.
  • Key: The key which the player has to press/release to trigger the block. Default is LeftShift.
  • Mobile Button Enabled: If this is on, touchscreen players will get a button on their screen that activates the block.
  • Mobile Button Position: The UDIM2 position (possibly scale) of the mobile button on a players screen if "Mobile Button Enabled" is on.
  • Mobile Button Text: What the text on the block's mobile button will be if "Mobile Button Enabled" is on.

Emits a signal once an NPC does the selected NPC event.
Output: The NPC's NPC Block.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Event: The NPC Event to detect.

Emits a signal every time a player chats.
Output: Either the player's username or what they said depending on the "Output Type" setting.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Output Type: Determines if the block will output the players chat message or their username when its fired. Default is "Message".

Emits a signal when the selected player event is triggered.
Output: The player's username.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Event: The Player Event to detect.
All player events
PlayerJoined - Triggers when a player joins the world

PlayerLeft - Triggers when a player leaves the world
PlayerRespawned - Triggers when a player respawns

PlayerKills - Triggers when a player kills another player

Emits a signal when a Player/NPC touches this block.
Output: The player's username. (If Detect is set to "NPC" it always outputs the NPC Block)
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Detect: A dropdown menu with the items: Players, NPCs, Everything.
  • Use Activation Time: When this is off, the block will only stop firing once the Player/NPC stops touching the block.

Emits a signal when it's Proximity Prompt has been triggered.
Output: The player's username.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Hold Duration: Amount of time to trigger the prompt. Default is 0.5
  • Key: Key to hold when triggering the prompt. Default is E.
  • Toggleable: Whether if this block acts like a switch. Default is true.

Emits a signal when the specified item name is bought.
Output: The player's username.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Item Name: The item to detect a purchase on.

Emits a signal when a player presses a mouse button.
Output: The player's username.
Configurations:

  • Activation Time: How long it activates for. Default is 1.
  • Input Detection Type: Determines if the block will fire if the input ended, or started.
  • Key: What mouse button is being interacted with.
  • Use Activation Time: When this is off, the block will only stop firing once the Player stops giving inputs. (Will be turned On if Input Detection Type is "InputEnded")

Logic

These are blocks that allow a player with build permissions to add extra functionality to their world, these examples include:

  • Ctrl to sprint
  • E to activate ability

and etc.

Notice!

An input is where the gate recieves a signal from a wire connected to it. An output is where the gate sends a signal to a wire connected from it.

"true" = active signal

"false" = inactive signal

This is known as a bool