Logic: Difference between revisions
No edit summary |
No edit summary |
||
Line 233: | Line 233: | ||
Output: any</span> |
Output: any</span> |
||
</tab> |
</tab> |
||
<tab name="PLAYER OWNS PASS Gate">[[File:PlayerOwnsPassGatePreview.png|300px]] |
|||
Outputs a signal when a player owns a pass/gear.<br> |
|||
<span style="color:#72aacc;">Input: Pass Name/Gear ID<br> |
|||
Output: Player Username</span> |
|||
* Pass/Gear ID: The pass/gear id used for check if a player has the inputted pass or not.</tab> |
|||
<tab name="REPEATER Gate">Repeatedly sends a signal, How it's sent depends on the loop type. |
<tab name="REPEATER Gate">Repeatedly sends a signal, How it's sent depends on the loop type. |
||
* Activation time: how long the signal will last until it loops back again. |
* Activation time: how long the signal will last until it loops back again. |
||
Line 247: | Line 253: | ||
* Stat name: The stat name to set. |
* Stat name: The stat name to set. |
||
* Value: The new value to set (or add / subtract) the stat.</tab> |
* Value: The new value to set (or add / subtract) the stat.</tab> |
||
<tab name="TEXT EDITING Gate"> |
<tab name="TEXT EDITING Gate">[[File:TextEditingGatePreview.png|300px]] |
||
Sets the value of the connected TEXT STORAGE. |
|||
<span style="color:#72aacc;">Input: any<br> |
<span style="color:#72aacc;">Input: any<br> |
||
Output: none (String if Next Gate Type is Normal)</span> |
Output: none (String if Next Gate Type is Normal)</span> |
||
Line 254: | Line 261: | ||
* Operation Type: Decides what to do with the value. |
* Operation Type: Decides what to do with the value. |
||
* Value: The value to set a TEXT STORAGE to. (Output if Next Gate Type is Normal)</tab> |
* Value: The value to set a TEXT STORAGE to. (Output if Next Gate Type is Normal)</tab> |
||
<tab name="TEXT INPUT Gate"> |
<tab name="TEXT INPUT Gate">[[File:TextInputGatePreview.png|300px]] |
||
Brings up a dialog box on the Input's screen and outputs the response. |
|||
<span style="color:#72aacc;">Input: any<br> |
<span style="color:#72aacc;">Input: any<br> |
||
Output: String</span> |
Output: String</span> |
||
Line 260: | Line 268: | ||
* Input Position: Changes the dialog's position. |
* Input Position: Changes the dialog's position. |
||
* Input Size: Changes the dialog's size.</tab> |
* Input Size: Changes the dialog's size.</tab> |
||
<tab name="TEXT STORAGE Gate"> |
<tab name="TEXT STORAGE Gate">[[File:TextStorageGatePreview.png|300px]] |
||
Stores a text value that can be edited using a TEXT EDITING Gate. |
|||
<span style="color:#72aacc;">Input: TEXT EDITING Signal<br> |
<span style="color:#72aacc;">Input: TEXT EDITING Signal<br> |
||
Output: String</span> |
Output: String</span> |
Revision as of 01:12, 17 April 2024
Logic (WIP, HIRING) This page is a work-in-progress and may contain user notes. |
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/b/bc/Block_touch_detectorpreview.png/300px-Block_touch_detectorpreview.png)
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/0/04/Click_blockpreview.png/300px-Click_blockpreview.png)
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+. |
![](http://static.miraheze.org/wubbypediawiki/thumb/9/97/Frame_loop_blockpreview.png/300px-Frame_loop_blockpreview.png)
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. |
![](http://static.miraheze.org/wubbypediawiki/thumb/f/f4/Humanoid_state_blockpreview.png/300px-Humanoid_state_blockpreview.png)
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/a/aa/Key_input_blockpreview.png/300px-Key_input_blockpreview.png)
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/6/6a/Npc_event_blockpreview.png/300px-Npc_event_blockpreview.png)
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/e/eb/Player_chatted_blockpreview.png/300px-Player_chatted_blockpreview.png)
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".
![](http://static.miraheze.org/wubbypediawiki/thumb/d/d0/Player_event_blockpreview.png/300px-Player_event_blockpreview.png)
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
![](http://static.miraheze.org/wubbypediawiki/thumb/6/6b/Player_touch_detectorpreview.png/300px-Player_touch_detectorpreview.png)
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/9/99/Prompt_blockpreview.png/300px-Prompt_blockpreview.png)
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/5/5e/Shop_event_blockpreview.png/300px-Shop_event_blockpreview.png)
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.
![](http://static.miraheze.org/wubbypediawiki/thumb/c/cf/Tap_input_blockpreview.png/300px-Tap_input_blockpreview.png)
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 |
Warning Gate descriptions are in-progress and may be incorrect, if you find any incorrect circuits please use the wiki feedback form. |
Input: 2 values (any)
Output: Bool
Input: none
Output: none
- Value: The Bool Value to set a BOOL STORAGE to.
Input: Bool
Output: Stored Value
- Delay Before Output: Seconds to wait before outputting.
- Save Value: ??? (presumably decides whether value is saved on world restart)
- Value: The stored value.
Input: none
Output: none
Input: Vector3
Output: Number (none if Input is not a vector3)
- Axis: The axis to get from the input.
Input: any (Number if gate uses {INPUT})
Output: Vector3
- X: The X Axis of the Vector3
- Y: The Y Axis of the Vector3
- Z: The Z Axis of the Vector3
Notice! The Property can be changed in the "Types" Tab in Properties |
Changes the signal into the selected property.
Input: any (Ignored)
Output: any
- Selected Property: The property type to change into.
wait()
)
Input: any
Output: any (same as Input)
- Delay: The amount of time to delay.
- Ignore Deactivation: Determines if the gate will stop its signal when the previous gate stopped sending its signal
Input: any (Block if Destination is not set)
Output: any (The type of the retrieved property)
- Property Name: The property to retrieve.
- Destination: The block to get the properties from.
![](http://static.miraheze.org/wubbypediawiki/thumb/6/62/GetGamePropertypreview.png/300px-GetGamePropertypreview.png)
Gets a property of the world.
Input: any (Type Needed Differs)
Output: any (The type of the retrieved property)
- Property Name: The property to retrieve.
- Value: ??
Depending on the chosen property the Input may need to be a specific type.
- NumPlayersOnTeam: Requires a team name as input.
- IsPlayerOnServer: Requires a username as input.
- TotalColoredBlocks: Requires a color as input.
![](http://static.miraheze.org/wubbypediawiki/thumb/c/c8/GetNPCPropertypreview.png/300px-GetNPCPropertypreview.png)
Gets a property of the specified NPC Block.
Input: any (NPC Block if no Destination is set)
Output: any (The type of the retrieved property)
- Property Name: The property to retrieve.
- Destination: The NPC Block to get the properties from.
Input: Player Username
Output: any (The type of the retrieved property)
- Property Name: The property to retrieve.
![](http://static.miraheze.org/wubbypediawiki/thumb/a/a8/GetStatpreview.png/300px-GetStatpreview.png)
Gets the stat of the specified player.
Input: Player Username
Output: Number
- Stat Name: The stat to retrieve.
Input: any
Output: Bool
- Check Type: How the value is compared.
- Keep Activation: Determines if the gate will stop its signal when the previous gate stopped sending its signal
- Value: The value to compare the Input to.
Input: any
Output: Player Username
- Active Time: How long each loop takes. (seconds)
- Delay: How long to wait for another loop. (seconds)
- Loop Type: Determines if it loops through NPCs or Players.
Input: Number
Output: Number
- Math Order: Determines if the Input is before the Value and vice versa.
- Operation Type: The operation to do.
- Next Gate Type: Determines if the output needs to go through a NUMBER STORAGE to complete an operation.
- Disable Output: Determines if a connected NUMBER STORAGE outputs its value after this gate output.
- Value: The value to calculate the Input with.
Input: any
Output: Bool (true/false)
Notice! Use An example would be creating a Random Number Generator (RNG). |
Sets the value of a NUMBER STORAGE Gate
Input: any (Number if using Input)
Output: none
- Disable Output: Determines if a connected NUMBER STORAGE outputs its value after this gate output.
- Value: The value to store the NUMBER STORAGE.
Input: Number
Output: Number
- Delay Before Output: Seconds to wait before outputting.
- Save Value: ??? (presumambly decides whether value is saved on world restart)
- Value: The stored value.
Notice! This gate will pass any input it receives to its output. |
If 1 or more signals are connected to this gate, this gate will fire.
Input: any
Output: any
![](http://static.miraheze.org/wubbypediawiki/thumb/f/f8/PlayerOwnsPassGatePreview.png/300px-PlayerOwnsPassGatePreview.png)
Outputs a signal when a player owns a pass/gear.
Input: Pass Name/Gear ID
Output: Player Username
- Pass/Gear ID: The pass/gear id used for check if a player has the inputted pass or not.
- Activation time: how long the signal will last until it loops back again.
- Delay: how long to wait before the next loop starts
- Loop Type: How the repeater will behave.
- Increment: The Increment to use when in enumerating or repetition mode (eg if increment is 2 then the loop would be like 2, 4, 6,...).
- Start index: the starting number the repeater will use
- Finish index: the ending number the repeater will use
![](http://static.miraheze.org/wubbypediawiki/thumb/a/a9/SetStatpreview.png/300px-SetStatpreview.png)
Sets the stat of the input and outputs the stat's value
Input: Player Username
Output: Number
- Operation Type: Set, add or subteact the stat value.
- Stat name: The stat name to set.
- Value: The new value to set (or add / subtract) the stat.
![](http://static.miraheze.org/wubbypediawiki/thumb/2/22/TextEditingGatePreview.png/300px-TextEditingGatePreview.png)
Sets the value of the connected TEXT STORAGE.
Input: any
Output: none (String if Next Gate Type is Normal)
- Next Gate Type: Decides if it can go through only a TEXT STORAGE or any gate.
- Disable Output: Determines if a connected TEXT STORAGE outputs its value after this gate output.
- Operation Type: Decides what to do with the value.
- Value: The value to set a TEXT STORAGE to. (Output if Next Gate Type is Normal)
![](http://static.miraheze.org/wubbypediawiki/thumb/c/c2/TextInputGatePreview.png/300px-TextInputGatePreview.png)
Brings up a dialog box on the Input's screen and outputs the response.
Input: any
Output: String
- Cancel Button Disabled: Decides of if the Cancel / X Button shows up.
- Input Position: Changes the dialog's position.
- Input Size: Changes the dialog's size.
![](http://static.miraheze.org/wubbypediawiki/thumb/a/a2/TextStorageGatePreview.png/300px-TextStorageGatePreview.png)
Stores a text value that can be edited using a TEXT EDITING Gate.
Input: TEXT EDITING Signal
Output: String
- Delay Before Output: Seconds to wait before outputting.
- Save Value: ??? (presumambly decides whether value is saved on world restart)
- Value: The stored value.
Input: Number
Output: Number
- Operation type: Decides what to do with the X, Y and Z numbers.
- X: X of the vector.
- Y: Y of the vector.
- Z: Z of the vector.
Input: any (Multiple)
Output: Bool