Skip to content

Commit

Permalink
Added Transparency and CanTouch attrs to Part
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangmeyers committed Apr 10, 2022
1 parent ec9cb0b commit 98f9f76
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/public/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Blockly.Lua['instance_get_children'] = function (block) {
// part blocks

// get various attributes of a part
// CanCollide, CFrame, Position, BrickColor
// CanCollide, CFrame, Position, BrickColor, Transparency, CanTouch
Blockly.Blocks['part_get_attribute'] = {
init: function () {
this.appendDummyInput()
Expand All @@ -130,7 +130,9 @@ Blockly.Blocks['part_get_attribute'] = {
["CanCollide", "CanCollide"],
["CFrame", "CFrame"],
["Position", "Position"],
["BrickColor", "BrickColor"]
["BrickColor", "BrickColor"],
["Transparency", "Transparency"],
["CanTouch", "CanTouch"],
]), "ATTRIBUTE")
.appendField("of")
.appendField(new Blockly.FieldVariable("part"), "PART");
Expand All @@ -149,7 +151,7 @@ Blockly.Lua['part_get_attribute'] = function (block) {
}

// set various attributes of a part
// CanCollide, CFrame, Position, BrickColor
// CanCollide, CFrame, Position, BrickColor, Transparency, CanTouch
Blockly.Blocks['part_set_attribute'] = {
init: function () {
this.appendValueInput("VALUE")
Expand All @@ -159,7 +161,9 @@ Blockly.Blocks['part_set_attribute'] = {
["CanCollide", "CanCollide"],
["CFrame", "CFrame"],
["Position", "Position"],
["BrickColor", "BrickColor"]
["BrickColor", "BrickColor"],
["Transparency", "Transparency"],
["CanTouch", "CanTouch"]
]), "ATTRIBUTE")
.appendField("of")
.appendField(new Blockly.FieldVariable("part"), "PART")
Expand Down
8 changes: 8 additions & 0 deletions examples/timed-lava/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Timed Lava

Based on [this question](https://www.reddit.com/r/ROBLOXStudio/comments/tkb74y/how_do_i_create_timed_lava_like_this_is_roblox/i1t91nc/?context=3) from reddit.

The following script will add lava behavior to all child blocks in the parent folder "LavaBlocks".
All source code is saved in the roblox studio file in this folder.

![](script-source.png)
Binary file added examples/timed-lava/script-source.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 98f9f76

Please sign in to comment.